Skip to content

Commit

Permalink
chore: Removes the ChartIcon component (#17216)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina authored Oct 26, 2021
1 parent dbf5225 commit dd71035
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 58 deletions.
44 changes: 0 additions & 44 deletions superset-frontend/src/components/ChartIcon/index.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -40,11 +49,7 @@ function traverse({ currentNode = {}, selectedChartId }) {
'selected-filter': selectedChartId === value,
})}
>
{type === CHART_TYPE && (
<span className="type-indicator">
<ChartIcon />
</span>
)}
{type === CHART_TYPE && <ChartIcon />}
{label}
</span>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dd71035

Please sign in to comment.