diff --git a/superset-frontend/src/components/Datasource/CollectionTable.tsx b/superset-frontend/src/components/Datasource/CollectionTable.tsx index 17741bb31ecae..7ce0bfb95fbdc 100644 --- a/superset-frontend/src/components/Datasource/CollectionTable.tsx +++ b/superset-frontend/src/components/Datasource/CollectionTable.tsx @@ -23,7 +23,6 @@ import Button from 'src/components/Button'; import Icons from 'src/components/Icons'; import Fieldset from './Fieldset'; import { recurseReactClone } from './utils'; -import './crud.less'; interface CRUDCollectionProps { allowAddItem?: boolean; @@ -102,9 +101,28 @@ const CrudTableWrapper = styled.div<{ stickyHeader?: boolean }>` min } `} - th span { - vertical-align: ${({ theme }) => theme.gridUnit * -2}px; - } + ${({ theme }) => ` + th span { + vertical-align: ${theme.gridUnit * -2}px; + } + .text-right { + text-align: right; + } + .empty-collection { + padding: ${theme.gridUnit * 2 + 2}px; + } + .tiny-cell { + width: ${theme.gridUnit + 1}px; + } + i.fa-caret-down, + i.fa-caret-up { + width: ${theme.gridUnit + 1}px; + } + td.expanded { + border-top: 0; + padding: 0; + } + `} `; const CrudButtonWrapper = styled.div` diff --git a/superset-frontend/src/components/Datasource/Field.tsx b/superset-frontend/src/components/Datasource/Field.tsx index 80388b6692f83..2d150c21884c0 100644 --- a/superset-frontend/src/components/Datasource/Field.tsx +++ b/superset-frontend/src/components/Datasource/Field.tsx @@ -20,7 +20,6 @@ import React, { useCallback } from 'react'; import { css, SupersetTheme } from '@superset-ui/core'; import { Tooltip } from 'src/components/Tooltip'; import { FormItem, FormLabel } from 'src/components/Form'; -import './crud.less'; const formItemInlineCss = css` .ant-form-item-control-input-content { diff --git a/superset-frontend/src/components/Datasource/crud.less b/superset-frontend/src/components/Datasource/crud.less deleted file mode 100644 index da9f2470da716..0000000000000 --- a/superset-frontend/src/components/Datasource/crud.less +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -@import '../../assets/stylesheets/less/variables.less'; - -.CRUD { - .text-right { - text-align: right; - } - - .empty-collection { - padding: 10px; - } - - .control-label { - font-weight: @font-weight-bold; - } - - .tiny-cell { - width: 5px; - } - - i.fa-caret-down, - i.fa-caret-up { - width: 5px; - } - - td.expanded { - border-top: 0; - padding: 0; - } - - .frame { - border: 1px solid @gray-heading; - border-radius: @border-radius-large; - padding: 10; - background: @gray-bg; - } -}