Closed
Description
openedon Apr 19, 2018
I use @storybook/cli@4.0.0-alpha.3
.
const styles = {
textAlign: 'center',
};
let CenterDecorator = (storyFn) => (
<div style={styles}>
{ storyFn() }
</div>
)
storiesOf('Button', module)
.addDecorator(CenterDecorator)
.add('with text', () => ({
components: { MyButton },
template: '<my-button @click="action">Hello Button</my-button>',
methods: { action: action('clicked') },
}))
.add('with JSX', () => ({
components: { MyButton },
render(h) {
return <my-button onClick={this.action}>With JSX</my-button>;
},
methods: { action: linkTo('clicked') },
}))
I get the error: ReferenceError: h is not defined
.
If add h
in render
, it work. #3409
But on the addDecorator
, I cant get the h
.
Metadata
Assignees
Labels
No labels
Activity