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

111 lines
2.0 KiB
JavaScript
Raw Normal View History

2018-02-06 03:06:45 +00:00
import { storiesOf } from '@storybook/vue'
2018-02-06 02:36:22 +00:00
2018-02-06 03:06:45 +00:00
import Centered from '@storybook/addon-centered'
2019-06-25 10:01:58 +00:00
import VuetifyLogo from '~/components/VuetifyLogo.vue'
2018-02-06 02:36:22 +00:00
storiesOf('Vuetify/Logo', module)
.addDecorator(Centered)
.add('Logo', () => ({
2018-02-06 03:06:45 +00:00
render: h => h(VuetifyLogo)
}))
2018-02-06 02:36:22 +00:00
const menuItems = [
{
2018-02-06 03:06:45 +00:00
action: 'local_activity',
title: 'Attractions',
items: [{ title: 'List Item' }]
2018-02-06 02:36:22 +00:00
},
{
2018-02-06 03:06:45 +00:00
action: 'restaurant',
title: 'Dining',
2018-02-06 02:36:22 +00:00
active: true,
items: [
2018-02-06 03:06:45 +00:00
{ title: 'Breakfast & brunch' },
{ title: 'New American' },
{ title: 'Sushi' }
2018-02-06 02:36:22 +00:00
]
},
{
2018-02-06 03:06:45 +00:00
action: 'school',
title: 'Education',
items: [{ title: 'List Item' }]
2018-02-06 02:36:22 +00:00
},
{
2018-02-06 03:06:45 +00:00
action: 'directions_run',
title: 'Family',
items: [{ title: 'List Item' }]
2018-02-06 02:36:22 +00:00
},
{
2018-02-06 03:06:45 +00:00
action: 'healing',
title: 'Health',
items: [{ title: 'List Item' }]
2018-02-06 02:36:22 +00:00
},
{
2018-02-06 03:06:45 +00:00
action: 'content_cut',
title: 'Office',
items: [{ title: 'List Item' }]
2018-02-06 02:36:22 +00:00
},
{
2018-02-06 03:06:45 +00:00
action: 'local_offer',
title: 'Promotions',
items: [{ title: 'List Item' }]
2018-02-06 02:36:22 +00:00
}
2018-02-06 03:06:45 +00:00
]
2018-02-06 02:36:22 +00:00
const menuItemsAlt = [
{
2018-02-06 03:06:45 +00:00
action: 'inbox',
title: 'Mailbox'
2018-02-06 02:36:22 +00:00
},
{
2018-02-06 03:06:45 +00:00
action: 'note',
title: 'My Address'
2018-02-06 02:36:22 +00:00
},
{
2018-02-06 03:06:45 +00:00
action: 'assignment',
title: 'In Progress',
2018-02-06 02:36:22 +00:00
active: true,
items: [
2018-02-06 03:06:45 +00:00
{ title: 'Consolidation' },
{ title: 'Repacking' },
{ title: 'Shipping' }
2018-02-06 02:36:22 +00:00
]
},
{
2018-02-06 03:06:45 +00:00
action: 'playlist_add_check',
title: 'Registration'
2018-02-06 02:36:22 +00:00
},
{
2018-02-06 03:06:45 +00:00
action: 'account_circle',
title: 'Account'
2018-02-06 02:36:22 +00:00
},
{
2018-02-06 03:06:45 +00:00
action: 'view_headline',
title: 'Shipped'
2018-02-06 02:36:22 +00:00
}
2018-02-06 03:06:45 +00:00
]
2018-02-06 02:36:22 +00:00
2018-02-06 03:06:45 +00:00
storiesOf('Vuetify/V-Btn', module)
.add('Square Button', () => ({
2018-02-06 02:36:22 +00:00
components: {},
data () {
2018-02-06 02:36:22 +00:00
return {
items: menuItems
2018-02-06 03:06:45 +00:00
}
2018-02-06 02:36:22 +00:00
},
template:
'<v-btn color="success">Success</v-btn>'
}))
2018-02-06 03:06:45 +00:00
.add('with rounded button', () => ({
2018-02-06 02:36:22 +00:00
components: {},
data () {
2018-02-06 02:36:22 +00:00
return {
items: menuItemsAlt
2018-02-06 03:06:45 +00:00
}
2018-02-06 02:36:22 +00:00
},
template:
`<v-btn color="warning" large round dark>
Rounded button
</v-btn>`
2018-02-06 03:06:45 +00:00
}))