This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch and-import-cleanup
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/and-import-cleanup by this
push:
new ee24a17278 cleaning....
ee24a17278 is described below
commit ee24a172780f30ae4183bdce10edbc1575c654df
Author: Evan Rusackas <[email protected]>
AuthorDate: Wed Jul 10 09:57:53 2024 -0600
cleaning....
---
superset-frontend/src/components/Card/index.tsx | 4 +++-
superset-frontend/src/components/ListViewCard/index.tsx | 9 +++++----
superset-frontend/src/components/index.ts | 4 ++--
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/superset-frontend/src/components/Card/index.tsx
b/superset-frontend/src/components/Card/index.tsx
index 71acde079d..2cb558e4b3 100644
--- a/superset-frontend/src/components/Card/index.tsx
+++ b/superset-frontend/src/components/Card/index.tsx
@@ -35,4 +35,6 @@ const Card = ({ padded, ...props }: CardProps) => (
/>
);
-export default Card;
+export default Object.assign(Card, {
+ Meta: AntdCard.Meta,
+});
diff --git a/superset-frontend/src/components/ListViewCard/index.tsx
b/superset-frontend/src/components/ListViewCard/index.tsx
index ae026495d2..e59dad79ec 100644
--- a/superset-frontend/src/components/ListViewCard/index.tsx
+++ b/superset-frontend/src/components/ListViewCard/index.tsx
@@ -18,7 +18,7 @@
*/
import { ReactNode, ComponentType, ReactElement, FC } from 'react';
import { styled, useTheme } from '@superset-ui/core';
-import { Skeleton, AntdCard } from 'src/components';
+import { Skeleton, Card } from 'src/components';
import { Tooltip } from 'src/components/Tooltip';
import ImageLoader, { BackgroundPosition } from './ImageLoader';
import CertifiedBadge from '../CertifiedBadge';
@@ -29,7 +29,8 @@ const ActionsWrapper = styled.div`
justify-content: flex-end;
`;
-const StyledCard = styled(AntdCard)`
+const StyledCard = styled(Card)`
+ // TODO: move all these styles to the Card component.
${({ theme }) => `
border: 1px solid ${theme.colors.grayscale.light2};
border-radius: ${theme.gridUnit}px;
@@ -216,7 +217,7 @@ function ListViewCard({
}
>
{loading && (
- <AntdCard.Meta
+ <Card.Meta
title={
<>
<TitleContainer>
@@ -250,7 +251,7 @@ function ListViewCard({
/>
)}
{!loading && (
- <AntdCard.Meta
+ <Card.Meta
title={
<TitleContainer>
{subtitle || null}
diff --git a/superset-frontend/src/components/index.ts
b/superset-frontend/src/components/index.ts
index 4c425b0534..8e9acd96cb 100644
--- a/superset-frontend/src/components/index.ts
+++ b/superset-frontend/src/components/index.ts
@@ -24,6 +24,7 @@
*/
export { default as Select } from './Select/Select';
export { default as AsyncSelect } from './Select/AsyncSelect';
+export { default as Card } from './Card';
/*
* Components that don't conflict with the ones in src/components.
@@ -55,8 +56,7 @@ export {
* or extending the components in src/components.
*/
export {
- Breadcrumb as AntdBreadcrumb,
- Button as AntdButton,
+ Breadcrumb as AntdBreadcrumb, // TODO: Make this a real Component
Card as AntdCard,
Checkbox as AntdCheckbox,
Collapse as AntdCollapse,