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

46 lines
938 B
JavaScript
Raw Normal View History

2018-02-06 02:36:22 +00:00
import {
nStoriesOf,
2018-02-06 03:06:45 +00:00
// action,
// boolean,
// text,
// color,
// array,
2018-02-06 02:36:22 +00:00
object
2018-02-06 03:06:45 +00:00
} from './storybase.js'
2018-02-06 02:36:22 +00:00
2018-02-06 03:06:45 +00:00
import Logo from '~/components/Logo.vue'
2018-02-06 02:36:22 +00:00
// nStoriesOf({ Logo }, "Logo 1")
// .addDecorator(story => (
// <div style={{textAlign: 'center'}}>
// {story()}
// </div>
// ))
// .add("with some data", () => ({
// components: { Logo },
// template: `
// <logo :data="{ } "/>`
// }))
2018-02-06 03:06:45 +00:00
nStoriesOf({ Logo }, 'Logo ')
.add('with some data', () => ({
2018-02-06 02:36:22 +00:00
components: { Logo },
template: `
<v-app dark style="min-width:400px">
<v-container fill-height>
<v-flex xs12>
<logo :data="{ } "/>
</v-flex>
</v-container></v-app>`
}))
2018-02-06 03:06:45 +00:00
.addVT('with App layout', '<logo :data="{ } "/>')
.addVT('with a knob', () => {
2018-08-08 10:54:05 +00:00
const data = JSON.stringify(
2018-02-06 03:06:45 +00:00
object('Data', {
name: 'Apple',
2018-02-06 02:36:22 +00:00
count: 132
})
)
return `<logo :data='${data}' />`
})