Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/fuzzy-trainers-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@shopify/polaris': patch
'polaris.shopify.com': patch
---

Renamed `background` prop on `AlphaCard` for consistency
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function Default() {

export function BackgroundSubdued() {
return (
<AlphaCard backgroundColor="surface-subdued">
<AlphaCard background="surface-subdued">
<AlphaStack spacing="5">
<Text as="h3" variant="headingMd">
Online store dashboard
Expand Down
6 changes: 3 additions & 3 deletions polaris-react/src/components/AlphaCard/AlphaCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type CardBackgroundColorTokenScale = Extract<
export interface AlphaCardProps {
/** Elements to display inside card */
children?: React.ReactNode;
backgroundColor?: CardBackgroundColorTokenScale;
background?: CardBackgroundColorTokenScale;
hasBorderRadius?: boolean;
elevation?: CardElevationTokensScale;
padding?: SpacingSpaceScale;
Expand All @@ -32,7 +32,7 @@ export interface AlphaCardProps {

export const AlphaCard = ({
children,
backgroundColor = 'surface',
background = 'surface',
hasBorderRadius: hasBorderRadiusProp = true,
elevation = 'card',
padding = '5',
Expand All @@ -49,7 +49,7 @@ export const AlphaCard = ({

return (
<Box
background={backgroundColor}
background={background}
padding={padding}
shadow={elevation}
{...(hasBorderRadius && {borderRadius: defaultBorderRadius})}
Expand Down
2 changes: 1 addition & 1 deletion polaris.shopify.com/pages/examples/alpha-card-subdued.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {withPolarisExample} from '../../src/components/PolarisExampleWrapper';

function AlphaCardExample() {
return (
<AlphaCard backgroundColor="surface-subdued">
<AlphaCard background="surface-subdued">
<AlphaStack spacing="5">
<Text as="h3" variant="headingMd">
Online store dashboard
Expand Down
Loading