Skip to content

Commit

Permalink
add story for right header
Browse files Browse the repository at this point in the history
  • Loading branch information
SirCotare committed Oct 17, 2024
1 parent b7fc40e commit 52754c2
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/components/section/SectionHeader/SectionHeader.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs'
import { SectionHeader } from './SectionHeader'
import { Button } from "../../button";

<Meta title="Components/Section/SectionHeader" component={SectionHeader} />

# SectionHeader

This component can be used to create a section header swiftly.

It leverages the components [SectionHeaderArea](/docs/components-section-sectionheaderara--docs) and [SectionHeaderTitle](/docs/components-section-sectionheadertitle--docs).
It leverages the components [SectionHeaderArea](/docs/components-section-sectionheaderara--docs), [SectionHeaderRow](/docs/components-section-sectionheaderrow--docs) and [SectionHeaderTitle](/docs/components-section-sectionheadertitle--docs).

export const Template = ({ ...args }) => <SectionHeader {...args} />

Expand All @@ -17,6 +18,18 @@ export const Template = ({ ...args }) => <SectionHeader {...args} />
</Story>
</Canvas>

<Canvas>
<Story name="With right element" args={{ title: 'Header Title', right: <Button>Right</Button> }}>
{Template.bind({})}
</Story>
</Canvas>

<Canvas>
<Story name="Long title with right element" args={{ title: 'Very Long Title: lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet', right: <Button>Right</Button> }}>
{Template.bind({})}
</Story>
</Canvas>

### Props

<ArgsTable story="Default" />
<ArgsTable story="With right element" />

0 comments on commit 52754c2

Please sign in to comment.