diff --git a/superset-frontend/src/components/ListViewCard/ListViewCard.stories.tsx b/superset-frontend/src/components/ListViewCard/ListViewCard.stories.tsx
index fdd3778d5..27857ce1f 100644
--- a/superset-frontend/src/components/ListViewCard/ListViewCard.stories.tsx
+++ b/superset-frontend/src/components/ListViewCard/ListViewCard.stories.tsx
@@ -22,7 +22,6 @@ import { withKnobs, boolean, select, text } from '@storybook/addon-knobs';
import DashboardImg from 'images/dashboard-card-fallback.svg';
import ChartImg from 'images/chart-card-fallback.svg';
import { Dropdown, Menu } from 'src/common/components';
-import Icon from 'src/components/Icon';
import Icons from 'src/components/Icons';
import FaveStar from 'src/components/FaveStar';
import ListViewCard from '.';
@@ -76,7 +75,7 @@ export const SupersetListViewCard = () => (
}
>
-
+
}
diff --git a/superset-frontend/src/components/ListViewCard/index.tsx b/superset-frontend/src/components/ListViewCard/index.tsx
index a68974597..d7ebecfdd 100644
--- a/superset-frontend/src/components/ListViewCard/index.tsx
+++ b/superset-frontend/src/components/ListViewCard/index.tsx
@@ -18,7 +18,6 @@
*/
import React from 'react';
import { styled, useTheme } from '@superset-ui/core';
-import Icon, { IconName } from 'src/components/Icon';
import { AntdCard, Skeleton, ThinSkeleton } from 'src/common/components';
import { Tooltip } from 'src/components/Tooltip';
import ImageLoader, { BackgroundPosition } from './ImageLoader';
@@ -137,7 +136,7 @@ interface LinkProps {
}
const AnchorLink: React.FC = ({ to, children }) => (
- {children}
+ {children}
);
interface CardProps {
@@ -154,7 +153,7 @@ interface CardProps {
coverRight?: React.ReactNode;
actions?: React.ReactNode | null;
rows?: number | string;
- avatar?: string;
+ avatar?: React.ReactElement | null;
cover?: React.ReactNode | null;
}
@@ -254,7 +253,7 @@ function ListViewCard({
}
description={description}
- avatar={avatar ? : null}
+ avatar={avatar || null}
/>
)}
diff --git a/superset-frontend/src/views/CRUD/chart/ChartCard.tsx b/superset-frontend/src/views/CRUD/chart/ChartCard.tsx
index 139b922a3..c9b2d20b6 100644
--- a/superset-frontend/src/views/CRUD/chart/ChartCard.tsx
+++ b/superset-frontend/src/views/CRUD/chart/ChartCard.tsx
@@ -17,10 +17,9 @@
* under the License.
*/
import React from 'react';
-import { t } from '@superset-ui/core';
+import { t, useTheme } from '@superset-ui/core';
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
import ConfirmStatusChange from 'src/components/ConfirmStatusChange';
-import Icon from 'src/components/Icon';
import Icons from 'src/components/Icons';
import Chart from 'src/types/Chart';
@@ -68,6 +67,7 @@ export default function ChartCard({
const canDelete = hasPerm('can_write');
const canExport =
hasPerm('can_read') && isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT);
+ const theme = useTheme();
const menu = (