mirror of
https://github.com/apache/superset.git
synced 2026-04-26 03:24:53 +00:00
refactor(Icons): Replaces custom icons with Ant Design 5 icons (#32112)
Replace custom icons with Ant Design 5 icons to standardize the icon
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
import { useMemo, FC, ReactElement } from 'react';
|
||||
|
||||
import { t, styled, useTheme } from '@superset-ui/core';
|
||||
import { t, styled, useTheme, SupersetTheme } from '@superset-ui/core';
|
||||
|
||||
import Button from 'src/components/Button';
|
||||
import Icons from 'src/components/Icons';
|
||||
@@ -44,13 +44,13 @@ export interface RunQueryActionButtonProps {
|
||||
const buildText = (
|
||||
shouldShowStopButton: boolean,
|
||||
selectedText: string | undefined,
|
||||
theme: SupersetTheme,
|
||||
): string | JSX.Element => {
|
||||
if (shouldShowStopButton) {
|
||||
return (
|
||||
<>
|
||||
{/* TODO: Remove fa-icon */}
|
||||
{/* eslint-disable-next-line icons/no-fa-icons-usage */}
|
||||
<i className="fa fa-stop" /> {t('Stop')}
|
||||
<Icons.Square iconSize="xs" iconColor={theme.colors.primary.light5} />
|
||||
{t('Stop')}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -150,13 +150,12 @@ const RunQueryActionButton = ({
|
||||
? {
|
||||
overlay: overlayCreateAsMenu,
|
||||
icon: (
|
||||
<Icons.CaretDown
|
||||
<Icons.DownOutlined
|
||||
iconColor={
|
||||
isDisabled
|
||||
? theme.colors.grayscale.base
|
||||
: theme.colors.grayscale.light5
|
||||
}
|
||||
name="caret-down"
|
||||
/>
|
||||
),
|
||||
trigger: 'click',
|
||||
@@ -165,7 +164,7 @@ const RunQueryActionButton = ({
|
||||
buttonStyle: shouldShowStopBtn ? 'warning' : 'primary',
|
||||
})}
|
||||
>
|
||||
{buildText(shouldShowStopBtn, selectedText)}
|
||||
{buildText(shouldShowStopBtn, selectedText, theme)}
|
||||
</ButtonComponent>
|
||||
</StyledButton>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user