2023-03-20 07:56:34 +02:00
|
|
|
import { type Preview, setup } from '@storybook/vue3';
|
|
|
|
import locale from './locale';
|
2023-03-19 15:22:14 +02:00
|
|
|
import theme from './theme';
|
|
|
|
import '../src/style.scss';
|
|
|
|
|
2023-03-20 07:56:34 +02:00
|
|
|
localStorage.setItem("locale", JSON.stringify(locale));
|
|
|
|
Promise.all([
|
|
|
|
import('../src/components'),
|
|
|
|
import('../src/directives'),
|
|
|
|
import('../src/widgets'),
|
|
|
|
import('../src/scripts/theme').then(({ applyTheme }) => applyTheme(theme)),
|
|
|
|
]).then(([{ default: components }, { default: directives }, { default: widgets }]) => {
|
|
|
|
setup((app) => {
|
|
|
|
components(app);
|
|
|
|
directives(app);
|
|
|
|
widgets(app);
|
|
|
|
});
|
|
|
|
})
|
2023-03-19 15:22:14 +02:00
|
|
|
|
|
|
|
const preview = {
|
|
|
|
parameters: {
|
|
|
|
layout: 'centered',
|
|
|
|
},
|
|
|
|
} satisfies Preview;
|
|
|
|
|
|
|
|
export default preview;
|