mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
33 lines
733 B
JavaScript
33 lines
733 B
JavaScript
import { configure } from '@storybook/vue'
|
|
import Vue from 'vue'
|
|
import Vuex from 'vuex'
|
|
import { action } from '@storybook/addon-actions'
|
|
|
|
Vue.use(Vuex)
|
|
Vue.component('nuxt-link', {
|
|
props: ['to'],
|
|
methods: {
|
|
log() {
|
|
action('link clicked')(this.to)
|
|
},
|
|
},
|
|
template: '<a href="#" @click.prevent="log()"><slot>NuxtLink</slot></a>',
|
|
})
|
|
Vue.component('client-only', {
|
|
render() {
|
|
return this.$slots.default
|
|
},
|
|
})
|
|
Vue.component('v-popover', {
|
|
template: '<div><slot>Popover Content</slot></div>',
|
|
})
|
|
|
|
// Automatically import all files ending in *.stories.js
|
|
const req = require.context('../components', true, /.story.js$/)
|
|
|
|
function loadStories() {
|
|
req.keys().forEach(req)
|
|
}
|
|
|
|
configure(loadStories, module)
|