mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 07:21:17 +08:00
Update storiesOf.md
This commit is contained in:
parent
8c326620fe
commit
efcda0a3cd
@ -63,7 +63,7 @@ We can control how the component's stories will render with parameters and decor
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
storiesOf('Button', module)
|
storiesOf('Button', module)
|
||||||
.addParameters({backgrounds: {values: [{name: "red" value: "#f00"}]}})
|
.addParameters({backgrounds: {values: [{name: "red", value: "#f00"}]}})
|
||||||
.addDecorator((Story) => <div style={{ margin: '3em' }}><Story/></div>)
|
.addDecorator((Story) => <div style={{ margin: '3em' }}><Story/></div>)
|
||||||
.addDecorator((Story) => <div style={{ height: '600px' }}><Story/></div>)
|
.addDecorator((Story) => <div style={{ height: '600px' }}><Story/></div>)
|
||||||
.add('with text', () => <Button onClick={action('clicked')}>Hello Button</Button>)
|
.add('with text', () => <Button onClick={action('clicked')}>Hello Button</Button>)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user