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:
Enzo Martellucci
2025-03-18 22:22:41 +01:00
committed by GitHub
parent 9e3052968b
commit ce6d5f5551
341 changed files with 2222 additions and 3999 deletions

View File

@@ -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>
);