diff --git a/storybook/src/components/Tabs/Tabs.stories.tsx b/storybook/src/components/Tabs/Tabs.stories.tsx index 445be865c3..32b46227bd 100644 --- a/storybook/src/components/Tabs/Tabs.stories.tsx +++ b/storybook/src/components/Tabs/Tabs.stories.tsx @@ -22,14 +22,16 @@ const SlowPanel = ({ children }: PropsWithChildren) => { } type TabContent = { + id: number label: string body: ReactNode } const tabsContent: Array = [ - { label: 'Gegevens', body: exampleParagraph() }, - { label: 'Aanslagen', body: exampleParagraph() }, + { id: 0, label: 'Gegevens', body: exampleParagraph() }, + { id: 1, label: 'Aanslagen', body: exampleParagraph() }, { + id: 2, label: 'Documenten', body: ( <> @@ -38,26 +40,25 @@ const tabsContent: Array = [ ), }, - { label: 'Acties', body: exampleParagraph() }, + { id: 3, label: 'Acties', body: exampleParagraph() }, ] const defaultTabs = [ - {tabsContent.map((content, index) => ( - - {content.label} + {tabsContent.map(({ id, label }) => ( + + {label} ))} , - ...(() => - tabsContent.map((content, index) => ( - -
- {content.label} - {content.body} -
-
- )))(), + tabsContent.map(({ id, body, label }) => ( + +
+ {label} + {body} +
+
+ )), ] const meta = {