Skip to content

Commit

Permalink
fix(cosmetic): cannot find m-r-10 class in superset.less (#20276)
Browse files Browse the repository at this point in the history
* fix(cosmetic): cannot find m-r-10 class in superset.less

* fix: remove .m-r-10 class and use emotion instead

* Update superset-frontend/src/components/Datasource/CollectionTable.tsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Update superset-frontend/src/components/Datasource/DatasourceEditor.jsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
  • Loading branch information
Renderz and michael-s-molina committed Jun 17, 2022
1 parent fa7f144 commit f6f93aa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 9 additions & 2 deletions superset-frontend/src/components/Datasource/CollectionTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ const CrudButtonWrapper = styled.div`
${({ theme }) => `margin-bottom: ${theme.gridUnit * 2}px`}
`;

const StyledButtonWrapper = styled.span`
${({ theme }) => `
margin-top: ${theme.gridUnit * 3}px;
margin-left: ${theme.gridUnit * 3}px;
`}
`;

export default class CRUDCollection extends React.PureComponent<
CRUDCollectionProps,
CRUDCollectionState
Expand Down Expand Up @@ -424,7 +431,7 @@ export default class CRUDCollection extends React.PureComponent<
<>
<CrudButtonWrapper>
{this.props.allowAddItem && (
<span className="m-t-10 m-r-10">
<StyledButtonWrapper>
<Button
buttonSize="small"
buttonStyle="tertiary"
Expand All @@ -434,7 +441,7 @@ export default class CRUDCollection extends React.PureComponent<
<i data-test="crud-add-table-item" className="fa fa-plus" />{' '}
{t('Add item')}
</Button>
</span>
</StyledButtonWrapper>
)}
</CrudButtonWrapper>
<CrudTableWrapper
Expand Down
11 changes: 9 additions & 2 deletions superset-frontend/src/components/Datasource/DatasourceEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ const StyledColumnsTabWrapper = styled.div`
}
`;

const StyledButtonWrapper = styled.span`
${({ theme }) => `
margin-top: ${theme.gridUnit * 3}px;
margin-left: ${theme.gridUnit * 3}px;
`}
`;

const checkboxGenerator = (d, onChange) => (
<CheckboxControl value={d} onChange={onChange} />
);
Expand Down Expand Up @@ -1361,7 +1368,7 @@ class DatasourceEditor extends React.PureComponent {
>
<StyledColumnsTabWrapper>
<ColumnButtonWrapper>
<span className="m-t-10 m-r-10">
<StyledButtonWrapper>
<Button
buttonSize="small"
buttonStyle="tertiary"
Expand All @@ -1372,7 +1379,7 @@ class DatasourceEditor extends React.PureComponent {
<i className="fa fa-database" />{' '}
{t('Sync columns from source')}
</Button>
</span>
</StyledButtonWrapper>
</ColumnButtonWrapper>
<ColumnCollectionTable
className="columns-table"
Expand Down

0 comments on commit f6f93aa

Please sign in to comment.