2019-04-26 18:36:24 -04:00
|
|
|
import { configure, addParameters, addDecorator } from '@storybook/vue';
|
2018-02-17 23:32:26 +03:00
|
|
|
import Vue from 'vue';
|
|
|
|
import Vuex from 'vuex';
|
2019-04-26 18:36:24 -04:00
|
|
|
import { withA11y } from '@storybook/addon-a11y';
|
2018-02-17 23:32:26 +03:00
|
|
|
import MyButton from '../src/stories/Button.vue';
|
2017-06-13 00:48:12 +02:00
|
|
|
|
2019-04-26 18:36:24 -04:00
|
|
|
addDecorator(withA11y);
|
2018-01-03 11:30:39 +02:00
|
|
|
Vue.component('my-button', MyButton);
|
|
|
|
Vue.use(Vuex);
|
2017-06-13 00:48:12 +02:00
|
|
|
|
2018-12-10 19:28:40 +01:00
|
|
|
addParameters({
|
|
|
|
options: {
|
2018-11-30 23:12:51 -05:00
|
|
|
hierarchyRootSeparator: /\|/,
|
2018-12-10 19:28:40 +01:00
|
|
|
},
|
|
|
|
});
|
2018-02-06 10:02:29 +02:00
|
|
|
|
2017-06-12 21:13:49 +02:00
|
|
|
function loadStories() {
|
|
|
|
require('../src/stories');
|
2018-02-06 10:02:29 +02:00
|
|
|
|
|
|
|
const req = require.context('../src/stories', true, /\.stories\.js$/);
|
2018-02-17 23:32:26 +03:00
|
|
|
req.keys().forEach(filename => req(filename));
|
2017-06-12 21:13:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
configure(loadStories, module);
|