From 418d5e52c4bff49dbade945e593769b3e6d74177 Mon Sep 17 00:00:00 2001 From: aveline Date: Mon, 3 Oct 2022 10:04:20 -0700 Subject: [PATCH 1/2] Rename `AlphaCard` shadow prop --- .../src/components/AlphaCard/AlphaCard.stories.tsx | 2 +- polaris-react/src/components/AlphaCard/AlphaCard.tsx | 11 ++++------- .../pages/examples/alpha-card-flat.tsx | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/polaris-react/src/components/AlphaCard/AlphaCard.stories.tsx b/polaris-react/src/components/AlphaCard/AlphaCard.stories.tsx index 562c4778dfd..fe520a0066c 100644 --- a/polaris-react/src/components/AlphaCard/AlphaCard.stories.tsx +++ b/polaris-react/src/components/AlphaCard/AlphaCard.stories.tsx @@ -60,7 +60,7 @@ export function BorderRadiusRoundedAbove() { export function Flat() { return ( - + Online store dashboard diff --git a/polaris-react/src/components/AlphaCard/AlphaCard.tsx b/polaris-react/src/components/AlphaCard/AlphaCard.tsx index d632ff46362..543c2f04a94 100644 --- a/polaris-react/src/components/AlphaCard/AlphaCard.tsx +++ b/polaris-react/src/components/AlphaCard/AlphaCard.tsx @@ -10,10 +10,7 @@ import React from 'react'; import {useBreakpoints} from '../../utilities/breakpoints'; import {Box} from '../Box'; -type CardElevationTokensScale = Extract< - DepthShadowAlias, - 'card' | 'transparent' ->; +type CardShadowTokensScale = Extract; type CardBackgroundColorTokenScale = Extract< ColorsTokenName, @@ -25,7 +22,7 @@ export interface AlphaCardProps { children?: React.ReactNode; background?: CardBackgroundColorTokenScale; hasBorderRadius?: boolean; - elevation?: CardElevationTokensScale; + shadow?: CardShadowTokensScale; padding?: SpacingSpaceScale; roundedAbove?: BreakpointsAlias; } @@ -34,7 +31,7 @@ export const AlphaCard = ({ children, background = 'surface', hasBorderRadius: hasBorderRadiusProp = true, - elevation = 'card', + shadow = 'card', padding = '5', roundedAbove, }: AlphaCardProps) => { @@ -51,7 +48,7 @@ export const AlphaCard = ({ {children} diff --git a/polaris.shopify.com/pages/examples/alpha-card-flat.tsx b/polaris.shopify.com/pages/examples/alpha-card-flat.tsx index 187e81b8eba..f238a025e3b 100644 --- a/polaris.shopify.com/pages/examples/alpha-card-flat.tsx +++ b/polaris.shopify.com/pages/examples/alpha-card-flat.tsx @@ -4,7 +4,7 @@ import {withPolarisExample} from '../../src/components/PolarisExampleWrapper'; function AlphaCardExample() { return ( - + Online store dashboard From cfd193d505ad18631c01e8fd083be62e455da18c Mon Sep 17 00:00:00 2001 From: aveline Date: Mon, 3 Oct 2022 10:26:18 -0700 Subject: [PATCH 2/2] Create selfish-poets-lick.md --- .changeset/selfish-poets-lick.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/selfish-poets-lick.md diff --git a/.changeset/selfish-poets-lick.md b/.changeset/selfish-poets-lick.md new file mode 100644 index 00000000000..54639f11916 --- /dev/null +++ b/.changeset/selfish-poets-lick.md @@ -0,0 +1,6 @@ +--- +'@shopify/polaris': patch +'polaris.shopify.com': patch +--- + +Renamed `AlphaCard` `shadow` prop