You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2022/06/23 17:52:31 UTC
[superset] 08/27: fix(cosmetic): cannot find m-r-10 class in superset.less (#20276)
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch 2.0
in repository https://gitbox.apache.org/repos/asf/superset.git
commit bd721cd86cccf9e041fc6c284d7a2d22213afc4f
Author: jiAng <46...@qq.com>
AuthorDate: Fri Jun 17 19:54:27 2022 +0800
fix(cosmetic): cannot find m-r-10 class in superset.less (#20276)
* 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 <70...@users.noreply.github.com>
* Update superset-frontend/src/components/Datasource/DatasourceEditor.jsx
Co-authored-by: Michael S. Molina <70...@users.noreply.github.com>
Co-authored-by: Michael S. Molina <70...@users.noreply.github.com>
(cherry picked from commit f6f93aad37e6258ec27af1b39335d0de9163210d)
---
.../src/components/Datasource/CollectionTable.tsx | 11 +++++++++--
.../src/components/Datasource/DatasourceEditor.jsx | 11 +++++++++--
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/superset-frontend/src/components/Datasource/CollectionTable.tsx b/superset-frontend/src/components/Datasource/CollectionTable.tsx
index 7ce0bfb95f..194d376579 100644
--- a/superset-frontend/src/components/Datasource/CollectionTable.tsx
+++ b/superset-frontend/src/components/Datasource/CollectionTable.tsx
@@ -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
@@ -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"
@@ -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
diff --git a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx
index 89ddcbdb81..94dd1241b0 100644
--- a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx
+++ b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx
@@ -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} />
);
@@ -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"
@@ -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"