diff --git a/superset-frontend/src/components/ChartIcon/index.tsx b/superset-frontend/src/components/ChartIcon/index.tsx deleted file mode 100644 index 5fdec9f6ed83..000000000000 --- a/superset-frontend/src/components/ChartIcon/index.tsx +++ /dev/null @@ -1,44 +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 React from 'react'; - -const ChartIcon = () => ( - - - - - - -); - -export default ChartIcon; diff --git a/superset-frontend/src/dashboard/components/filterscope/renderFilterScopeTreeNodes.jsx b/superset-frontend/src/dashboard/components/filterscope/renderFilterScopeTreeNodes.jsx index d35c663343be..fe4d92c4dbfc 100644 --- a/superset-frontend/src/dashboard/components/filterscope/renderFilterScopeTreeNodes.jsx +++ b/superset-frontend/src/dashboard/components/filterscope/renderFilterScopeTreeNodes.jsx @@ -18,10 +18,19 @@ */ import React from 'react'; import cx from 'classnames'; - -import ChartIcon from 'src/components/ChartIcon'; +import { styled } from '@superset-ui/core'; +import Icons from 'src/components/Icons'; import { CHART_TYPE } from 'src/dashboard/util/componentTypes'; +const ChartIcon = styled(Icons.BarChartOutlined)` + ${({ theme }) => ` + position: relative; + top: ${theme.gridUnit - 1}px; + color: ${theme.colors.primary.base}; + margin-right: ${theme.gridUnit * 2}px; + `} +`; + function traverse({ currentNode = {}, selectedChartId }) { if (!currentNode) { return null; @@ -40,11 +49,7 @@ function traverse({ currentNode = {}, selectedChartId }) { 'selected-filter': selectedChartId === value, })} > - {type === CHART_TYPE && ( - - - - )} + {type === CHART_TYPE && } {label} ), diff --git a/superset-frontend/src/dashboard/stylesheets/filter-scope-selector.less b/superset-frontend/src/dashboard/stylesheets/filter-scope-selector.less index 06e9bae63531..e12054e09da7 100644 --- a/superset-frontend/src/dashboard/stylesheets/filter-scope-selector.less +++ b/superset-frontend/src/dashboard/stylesheets/filter-scope-selector.less @@ -154,13 +154,8 @@ .filter-scope-type { padding: 8px 0; - display: block; - - .type-indicator { - position: relative; - top: 3px; - margin-right: 8px; - } + display: flex; + align-items: center; &.chart { font-weight: @font-weight-normal;