Skip to content

Commit

Permalink
Merge branch 'develop' into update-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
alimpens authored Jun 28, 2024
2 parents 5c654f6 + 2a7e23a commit 6bc3657
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions storybook/src/components/Tabs/Tabs.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@ const SlowPanel = ({ children }: PropsWithChildren) => {
}

type TabContent = {
id: number
label: string
body: ReactNode
}

const tabsContent: Array<TabContent> = [
{ 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: (
<>
Expand All @@ -38,26 +40,25 @@ const tabsContent: Array<TabContent> = [
</>
),
},
{ label: 'Acties', body: exampleParagraph() },
{ id: 3, label: 'Acties', body: exampleParagraph() },
]

const defaultTabs = [
<Tabs.List key="tabsList">
{tabsContent.map((content, index) => (
<Tabs.Button key={content.label} tab={index}>
{content.label}
{tabsContent.map(({ id, label }) => (
<Tabs.Button key={label} tab={id}>
{label}
</Tabs.Button>
))}
</Tabs.List>,
...(() =>
tabsContent.map((content, index) => (
<Tabs.Panel tab={index} key={content.label}>
<div style={{ paddingTop: '2rem' }}>
<Heading level={3}>{content.label}</Heading>
<Paragraph>{content.body}</Paragraph>
</div>
</Tabs.Panel>
)))(),
tabsContent.map(({ id, body, label }) => (
<Tabs.Panel key={label} tab={id}>
<div style={{ paddingTop: '2rem' }}>
<Heading level={3}>{label}</Heading>
<Paragraph>{body}</Paragraph>
</div>
</Tabs.Panel>
)),
]

const meta = {
Expand Down

0 comments on commit 6bc3657

Please sign in to comment.