-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
In wiki page on storybook decorators, the example code is wrong:
const CenterDecorator = ({ children }) => (
<div style={styles}>
{ children }
</div>
);
storiesOf('Button', module)
.addDecorator(CenterDecorator)
.add('with text', () => (
<Button onClick={action('clicked')}>Hello Button</Button>
))
this should be:
const CenterDecorator = (storyFn) => (
<div style={styles}>
{ storyFn() }
</div>
);
shilman