Skip to content

Commit

Permalink
List story children as array
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentSmedinga committed Dec 22, 2023
1 parent eeb24d1 commit b9be0d3
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions storybook/storybook-react/src/Overlap/Overlap.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,24 @@ type Story = StoryObj<typeof meta>

export const Default: Story = {
args: {
children: (
<>
<AspectRatio ratio="2x-wide">
<Image
alt=""
cover
sizes="(max-width: 36rem) 640px, (max-width: 68rem) 1280px, 1600px"
src="https://picsum.photos/640/180"
srcSet="https://picsum.photos/640/180 640w, https://picsum.photos/1280/360 1280w, https://picsum.photos/1600/450 1600w"
/>
</AspectRatio>
<Grid style={{ alignSelf: 'center' }}>
<Grid.Cell span={{ narrow: 4, medium: 6, wide: 8 }} start={{ narrow: 1, medium: 2, wide: 3 }}>
<SearchField onSubmit={(e) => e.preventDefault()}>
<SearchField.Input label="Zoeken" placeholder="Wat kunnen we voor u vinden?" />
<SearchField.Button />
</SearchField>
</Grid.Cell>
</Grid>
</>
),
children: [
<AspectRatio key="background-image" ratio="2x-wide">
<Image
alt=""
cover
sizes="(max-width: 36rem) 640px, (max-width: 68rem) 1280px, 1600px"
src="https://picsum.photos/640/180"
srcSet="https://picsum.photos/640/180 640w, https://picsum.photos/1280/360 1280w, https://picsum.photos/1600/450 1600w"
/>
</AspectRatio>,
<Grid key="search-field" style={{ alignSelf: 'center' }}>
<Grid.Cell span={{ narrow: 4, medium: 6, wide: 8 }} start={{ narrow: 1, medium: 2, wide: 3 }}>
<SearchField onSubmit={(e) => e.preventDefault()}>
<SearchField.Input label="Zoeken" placeholder="Wat kunnen we voor u vinden?" />
<SearchField.Button />
</SearchField>
</Grid.Cell>
</Grid>,
],
},
}

0 comments on commit b9be0d3

Please sign in to comment.