From 60d2523ce34f1e0f30284d8ce0fdb3c446cb88ea Mon Sep 17 00:00:00 2001 From: Vincent Smedinga Date: Fri, 20 Dec 2024 16:53:39 +0100 Subject: [PATCH] Consolidate story types further --- storybook/src/components/Figure/Figure.stories.tsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/storybook/src/components/Figure/Figure.stories.tsx b/storybook/src/components/Figure/Figure.stories.tsx index b959d66227..ebc56dc328 100644 --- a/storybook/src/components/Figure/Figure.stories.tsx +++ b/storybook/src/components/Figure/Figure.stories.tsx @@ -15,6 +15,7 @@ const meta = { component: Figure, args: { children: caption, + inverseColor: false, }, render: ({ children, ...args }) => (
@@ -28,21 +29,16 @@ const meta = { {children}
), -} satisfies Meta +} satisfies Meta +// We use the Caption type here to allow inverseColor. This works as long as Figure has no props of its own. export default meta -// eslint-disable-next-line @typescript-eslint/no-unused-vars -const captionMeta = { - component: Figure.Caption, -} satisfies Meta - type Story = StoryObj -type CaptionStory = StoryObj export const Default: Story = {} -export const InverseColour: CaptionStory = { +export const InverseColour: Story = { args: { inverseColor: true, },