mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-10 00:12:22 +08:00
20 lines
422 B
Plaintext
20 lines
422 B
Plaintext
```js
|
|
// Button.stories.js|jsx
|
|
|
|
import { Button } from './Button';
|
|
|
|
export default {
|
|
component: Button,
|
|
};
|
|
|
|
/*
|
|
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
|
|
* See https://storybook.js.org/docs/api/csf
|
|
* to learn how to use render functions.
|
|
*/
|
|
export const Primary = {
|
|
name: 'I am the primary',
|
|
render: () => <Button primary label="Button" />,
|
|
};
|
|
```
|