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,8 +18,9 @@
*/
import { ReactNode } from 'react';
import { t } from '@superset-ui/core';
import { t, useTheme } from '@superset-ui/core';
import Button from 'src/components/Button';
import Icons from 'src/components/Icons';
export type RunQueryButtonProps = {
loading: boolean;
@@ -30,7 +31,6 @@ export type RunQueryButtonProps = {
canStopQuery: boolean;
chartIsStale: boolean;
};
export const RunQueryButton = ({
loading,
onQuery,
@@ -39,12 +39,12 @@ export const RunQueryButton = ({
isNewChart,
canStopQuery,
chartIsStale,
}: RunQueryButtonProps) =>
loading ? (
}: RunQueryButtonProps) => {
const theme = useTheme();
return loading ? (
<Button onClick={onStop} buttonStyle="warning" disabled={!canStopQuery}>
{/* 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')}
</Button>
) : (
<Button
@@ -56,3 +56,4 @@ export const RunQueryButton = ({
{isNewChart ? t('Create chart') : t('Update chart')}
</Button>
);
};