Nuxt/examples/storybook/stories/Welcome.story.js

14 lines
415 B
JavaScript
Raw Normal View History

2018-02-06 03:06:45 +00:00
import { storiesOf } from '@storybook/vue'
import { linkTo } from '@storybook/addon-links'
2018-02-06 02:36:22 +00:00
2018-02-06 03:06:45 +00:00
import Welcome from '~/components/Welcome.vue'
2018-02-06 02:36:22 +00:00
storiesOf('Welcome', module).add('to Storybook', () => ({
2018-02-06 03:06:45 +00:00
render: h => h(Welcome)
2018-02-06 02:36:22 +00:00
}))
2018-02-06 03:06:45 +00:00
.add('with Link To Button', () => ({
2018-02-06 02:36:22 +00:00
components: { Welcome },
template: '<div align=center><welcome :showApp="action" /></div>',
2018-02-06 03:06:45 +00:00
methods: { action: linkTo('Button') }
}))