mirror of
https://github.com/apache/superset.git
synced 2026-06-05 15:49:27 +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,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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user