refactor: change xsm Icons and dnd icons to new dynamic icons (#14419)

* intial commit

* fix test and add more icons

* fix lint
This commit is contained in:
Phillip Kelley-Dotson
2021-05-12 22:52:25 -07:00
committed by GitHub
parent 5f7722cb36
commit 3eef38f309
3 changed files with 8 additions and 9 deletions

View File

@@ -18,7 +18,7 @@
*/
import React from 'react';
import { useTheme } from '@superset-ui/core';
import Icon from 'src/components/Icon';
import Icons from 'src/components/Icons';
import {
CaretContainer,
CloseContainer,
@@ -29,7 +29,6 @@ import { OptionProps } from 'src/explore/components/controls/DndColumnSelectCont
export default function Option(props: OptionProps) {
const theme = useTheme();
return (
<OptionControlContainer
data-test="option-label"
@@ -40,12 +39,12 @@ export default function Option(props: OptionProps) {
data-test="remove-control-button"
onClick={() => props.clickClose(props.index)}
>
<Icon name="x-small" color={theme.colors.grayscale.light1} />
<Icons.XSmall color={theme.colors.grayscale.light1} />
</CloseContainer>
<Label data-test="control-label">{props.children}</Label>
{props.withCaret && (
<CaretContainer>
<Icon name="caret-right" color={theme.colors.grayscale.light1} />
<Icons.CaretRight color={theme.colors.grayscale.light1} />
</CaretContainer>
)}
</OptionControlContainer>