2021-04-30 09:54:00 +00:00
|
|
|
import { addDecorator } from '@storybook/vue';
|
|
|
|
import Vue from 'vue';
|
|
|
|
import Vuex from 'vuex';
|
|
|
|
import VueI18n from 'vue-i18n';
|
|
|
|
|
|
|
|
import WootUiKit from '../app/javascript/dashboard/components';
|
|
|
|
import i18n from '../app/javascript/dashboard/i18n';
|
|
|
|
|
2021-04-29 16:42:06 +00:00
|
|
|
import '../app/javascript/dashboard/assets/scss/storybook.scss';
|
|
|
|
|
2021-04-30 09:54:00 +00:00
|
|
|
Vue.use(VueI18n);
|
|
|
|
Vue.use(WootUiKit);
|
|
|
|
Vue.use(Vuex);
|
|
|
|
|
|
|
|
const store = new Vuex.Store({});
|
|
|
|
const i18nConfig = new VueI18n({
|
|
|
|
locale: 'en',
|
|
|
|
messages: i18n,
|
|
|
|
});
|
|
|
|
|
|
|
|
addDecorator(() => ({
|
|
|
|
template: '<story/>',
|
|
|
|
i18n: i18nConfig,
|
|
|
|
store,
|
|
|
|
beforeCreate: function() {
|
|
|
|
this.$root._i18n = this.$i18n;
|
|
|
|
},
|
|
|
|
}));
|
|
|
|
|
2021-04-29 16:42:06 +00:00
|
|
|
export const parameters = {
|
|
|
|
actions: { argTypesRegex: '^on[A-Z].*' },
|
|
|
|
controls: {
|
|
|
|
matchers: {
|
|
|
|
color: /(background|color)$/i,
|
|
|
|
date: /Date$/,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|