diff --git a/src/components/PreviewPill/styles.ts b/src/components/PreviewPill/styles.ts index 06ebbf780..b706a873d 100644 --- a/src/components/PreviewPill/styles.ts +++ b/src/components/PreviewPill/styles.ts @@ -1,5 +1,4 @@ import { makeStyles } from "@saleor/macaw-ui"; -import { triangle } from "@saleor/styles/mixins"; const useStyles = makeStyles( theme => ({ @@ -7,13 +6,15 @@ const useStyles = makeStyles( zIndex: 11 }, tooltip: { - "&:before": { - ...triangle(theme.palette.saleor.warning.mid, 8), - content: "''", - position: "absolute", - left: 17, - top: -8 - }, + // TO-FIX + // Triangle's position is hard coded + // "&:before": { + // ...triangle(theme.palette.saleor.warning.mid, 8), + // content: "''", + // position: "absolute", + // left: 17, + // top: -8 + // }, background: theme.palette.saleor.warning.mid, borderRadius: 8, marginTop: theme.spacing(1.5), diff --git a/src/giftCards/components/GiftCardCustomerCard/CustomerGiftCardsCard.tsx b/src/giftCards/components/GiftCardCustomerCard/CustomerGiftCardsCard.tsx index cd17ab6ea..44746c6cf 100644 --- a/src/giftCards/components/GiftCardCustomerCard/CustomerGiftCardsCard.tsx +++ b/src/giftCards/components/GiftCardCustomerCard/CustomerGiftCardsCard.tsx @@ -3,6 +3,7 @@ import VerticalSpacer from "@saleor/apps/components/VerticalSpacer"; import CardTitle from "@saleor/components/CardTitle"; import CollectionWithDividers from "@saleor/components/CollectionWithDividers"; import Link from "@saleor/components/Link"; +import PreviewPill from "@saleor/components/PreviewPill"; import Skeleton from "@saleor/components/Skeleton"; import { useCustomerDetails } from "@saleor/customers/hooks/useCustomerDetails"; import GiftCardCreateDialogContent from "@saleor/giftCards/GiftCardCreateDialog/GiftCardCreateDialogContent"; @@ -62,17 +63,20 @@ const CustomerGiftCardsCard: React.FC = () => { - - - ) + <> + {!!giftCards?.length && ( + + )} + + } > buttonPosition === "left" ? "row" : "row-reverse" + }, + previewPill: { + marginLeft: theme.spacing(1) } }), { name: "CustomerGiftCardsCard" } diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index 615a0576e..33ad445d1 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -66929,6 +66929,19 @@ exports[`Storyshots Views / Customers / Customer details default 1`] = ` Gift Cards +
+
+ + Preview + +
+
+
+
+ + Preview + +
+
+
+
+ + Preview + +
+
+
+
+ + Preview + +
+
+
+
+ + Preview + +
+
+
+
+ + Preview + +
+
+
+
+ + Preview + +
+
+
+
+ + Preview + +
+
+
+
+ + Preview + +
+