Skip to content

Commit 17f154c

Browse files
committed
refactor(storybook): use satisfies and enhance type inference in AlphaStack
1 parent 05216e6 commit 17f154c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

packages/bezier-react/src/components/AlphaStack/AlphaStack.stories.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { AlphaStack } from './AlphaStack'
1414

1515
const FLEX_PROPERTIES = ['start', 'center', 'end', 'stretch']
1616

17-
const meta: Meta<typeof AlphaStack> = {
17+
const meta = {
1818
component: AlphaStack,
1919
argTypes: {
2020
spacing: {
@@ -41,9 +41,12 @@ const meta: Meta<typeof AlphaStack> = {
4141
options: FLEX_PROPERTIES,
4242
},
4343
},
44-
}
44+
} satisfies Meta<typeof AlphaStack>
45+
4546
export default meta
4647

48+
type Story = StoryObj<typeof meta>
49+
4750
const Template: StoryFn<typeof AlphaStack> = (args) => (
4851
<AlphaStack {...args}>
4952
<>
@@ -54,10 +57,11 @@ const Template: StoryFn<typeof AlphaStack> = (args) => (
5457
</AlphaStack>
5558
)
5659

57-
export const Primary: StoryObj<typeof AlphaStack> = {
60+
export const Primary: Story = {
5861
render: Template,
5962

6063
args: {
64+
direction: 'vertical',
6165
style: {
6266
width: '200px',
6367
height: '200px',

0 commit comments

Comments
 (0)