-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: add switch-card, section-spinner and spinner
- Loading branch information
Showing
4 changed files
with
139 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Meta, StoryObj } from '@storybook/react' | ||
import { SectionSpinner } from '../../components' | ||
|
||
const meta: Meta<typeof SectionSpinner> = { | ||
title: 'Components/Section Spinner', | ||
component: SectionSpinner, | ||
} | ||
|
||
export default meta | ||
type Story = StoryObj<typeof SectionSpinner> | ||
|
||
export const Default: Story = { | ||
args: {}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Meta, StoryObj } from '@storybook/react' | ||
import { Spinner } from '../../components' | ||
|
||
const meta: Meta<typeof Spinner> = { | ||
title: 'Components/Spinner', | ||
component: Spinner, | ||
} | ||
|
||
export default meta | ||
type Story = StoryObj<typeof Spinner> | ||
|
||
export const Default: Story = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import { Meta, StoryObj } from '@storybook/react' | ||
import cx from 'classnames' | ||
import { IconInfo, SwitchCard } from '../../components' | ||
|
||
const meta: Meta<typeof SwitchCard> = { | ||
title: 'Components/Switch Card', | ||
component: SwitchCard, | ||
} | ||
|
||
export default meta | ||
type Story = StoryObj<typeof SwitchCard> | ||
|
||
export const NotCollapsed: Story = { | ||
args: { | ||
icon: <IconInfo />, | ||
label: 'Show info', | ||
isCollapsed: false, | ||
localStorageNamespace: 'switch-card', | ||
expandedMinWidth: '200px', | ||
children: ( | ||
<p> | ||
Lorem ipsum odor amet, consectetuer adipiscing elit. Duis nascetur | ||
magnis morbi laoreet; montes porta. Pulvinar nunc per accumsan sed | ||
suspendisse sit sapien. Venenatis maximus inceptos taciti vestibulum | ||
porta sagittis quisque ipsum erat. Risus sodales conubia leo facilisi | ||
dignissim potenti senectus. Lectus feugiat ornare amet iaculis metus | ||
inceptos adipiscing placerat. Vestibulum faucibus facilisis viverra | ||
magna litora. Molestie lorem leo malesuada dictumst porta erat sagittis | ||
ullamcorper sollicitudin. Hendrerit ante maximus tincidunt, venenatis | ||
mauris molestie. | ||
</p> | ||
), | ||
}, | ||
render: (args) => ( | ||
<div className={cx('w-[300px]')}> | ||
<SwitchCard {...args} /> | ||
</div> | ||
), | ||
} | ||
|
||
export const Collapsed: Story = { | ||
args: { | ||
icon: <IconInfo />, | ||
label: 'Show info', | ||
isCollapsed: true, | ||
localStorageNamespace: 'switch-card', | ||
expandedMinWidth: '200px', | ||
children: ( | ||
<p> | ||
Lorem ipsum odor amet, consectetuer adipiscing elit. Duis nascetur | ||
magnis morbi laoreet; montes porta. Pulvinar nunc per accumsan sed | ||
suspendisse sit sapien. Venenatis maximus inceptos taciti vestibulum | ||
porta sagittis quisque ipsum erat. Risus sodales conubia leo facilisi | ||
dignissim potenti senectus. Lectus feugiat ornare amet iaculis metus | ||
inceptos adipiscing placerat. Vestibulum faucibus facilisis viverra | ||
magna litora. Molestie lorem leo malesuada dictumst porta erat sagittis | ||
ullamcorper sollicitudin. Hendrerit ante maximus tincidunt, venenatis | ||
mauris molestie. | ||
</p> | ||
), | ||
}, | ||
render: (args) => ( | ||
<div className={cx('w-[300px]')}> | ||
<SwitchCard {...args} /> | ||
</div> | ||
), | ||
} |