Skip to content

Commit 15f8855

Browse files
committed
remove style-based aspect-ratio
1 parent b861509 commit 15f8855

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/react/src/Card/Card.features.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const FullWidth: StoryFn<typeof Card> = () => {
4848
return (
4949
<Card href="https://github.com" fullWidth hasBorder>
5050
<Card.Image
51-
style={{aspectRatio: '16 / 10'}}
51+
aspectRatio="16:10"
5252
src={placeholderImage}
5353
alt="placeholder, blank area with an gray background color"
5454
/>

packages/react/src/Image/Image.features.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import {Meta, StoryFn} from '@storybook/react'
33

44
import placeholderImage from '../fixtures/images/placeholder-600x400.png'
55

6-
import {Image, ImageBorderRadiusOptions} from './Image'
6+
import {Image, type ImageAspectRatio, ImageBorderRadiusOptions} from './Image'
77
import {Stack} from '../Stack'
88

99
export default {
1010
title: 'Components/Image/Features',
1111
component: Image,
1212
} as Meta<typeof Image>
1313

14-
const demoAspectRatios = ['16 / 9', '16 / 10', '4 / 3', '1 / 1']
14+
const demoAspectRatios: ImageAspectRatio[] = ['16:9', '16:10', '4:3', '1:1']
1515

1616
export const AspectRatio: StoryFn<typeof Image> = () => (
1717
<Stack direction="horizontal" alignItems="flex-start">
@@ -21,7 +21,7 @@ export const AspectRatio: StoryFn<typeof Image> = () => (
2121
src={placeholderImage}
2222
alt="placeholder, blank area with an off-white background color"
2323
width={200}
24-
style={{aspectRatio}}
24+
aspectRatio={aspectRatio}
2525
/>
2626
))}
2727
</Stack>

packages/react/src/recipes/seo/Category/CategoryPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ export function CategoryPage({accentColor, variant, gridOverlay = false, colorMo
241241
<Card.Image
242242
src={cardImagePlaceholders[index]}
243243
alt="placeholder, blank area with an gray background color"
244-
style={{aspectRatio: '16 / 9'}}
244+
aspectRatio="16:9"
245245
/>
246246
<Card.Heading>Article page heading</Card.Heading>
247247
<Card.Description>

0 commit comments

Comments
 (0)