mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-28 05:10:17 +08:00
36 lines
571 B
Plaintext
36 lines
571 B
Plaintext
```md
|
|
<!-- Badge.stories.mdx --->
|
|
|
|
import { Canvas, Story } from '@storybook/addon-docs';
|
|
|
|
export const Template = (args) => ({ props: args });
|
|
|
|
<Canvas>
|
|
<Story
|
|
name="warning"
|
|
args={{
|
|
status: 'warning',
|
|
label: 'Warning',
|
|
}}>
|
|
{Template.bind({})}
|
|
</Story>
|
|
|
|
<Story
|
|
name="neutral"
|
|
args={{
|
|
status: 'neutral',
|
|
label: 'Neutral',
|
|
}}>
|
|
{Template.bind({})}
|
|
</Story>
|
|
|
|
<Story
|
|
name="error"
|
|
args={{
|
|
status: 'error',
|
|
label: 'Error',
|
|
}}>
|
|
{Template.bind({})}
|
|
</Story>
|
|
</Canvas>
|
|
``` |