platform/dev/storybook/.storybook/preview.js
Andrey Sobolev a4cd43dbe2
Squashed commit of the following: (#3102)
commit fa57e53c9e
Author: Oleg Markelov <markelolegov@gmail.com>
Date:   Tue Apr 25 13:56:16 2023 +0700

    Add format script placeholder

    Signed-off-by: Oleg Markelov <markelolegov@gmail.com>

commit fb185be4b1
Author: Oleg Markelov <markelolegov@gmail.com>
Date:   Tue Apr 25 13:17:22 2023 +0700

    Update pnpm-lock.yaml

    Signed-off-by: Oleg Markelov <markelolegov@gmail.com>

commit babd91c87a
Merge: 5e0b1929a 5c30b8897
Author: Oleg Markelov <markelolegov@gmail.com>
Date:   Tue Apr 25 13:01:18 2023 +0700

    Merge branch 'main' into storybook-7-infrastructure
    Signed-off-by: Oleg Markelov <markelolegov@gmail.com>

commit 5e0b1929a9
Author: Oleg Markelov <markelolegov@gmail.com>
Date:   Tue Apr 25 12:59:07 2023 +0700

    Create initial Button stories

    Signed-off-by: Oleg Markelov <markelolegov@gmail.com>

commit 04099e8c22
Author: Oleg Markelov <markelolegov@gmail.com>
Date:   Tue Apr 25 12:58:26 2023 +0700

    Add storybook-7 infrastructure

    Signed-off-by: Oleg Markelov <markelolegov@gmail.com>

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
2023-04-28 11:41:22 +07:00

46 lines
997 B
JavaScript

/** @type { import('@storybook/svelte').Preview } */
import '@hcengineering/theme/styles/global.scss';
import './styles/styles.scss';
import { addStringsLoader } from '@hcengineering/platform';
import ThemeDecorator from './decorators/ThemeDecorator';
addStringsLoader('ui', async (lang) => {
return await import(`@hcengineering/ui/lang/${lang}.json`);
});
const preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
backgrounds: { disable: true },
controls: {
expanded: true,
matchers: {
color: /(background|color)$/i,
date: /Date$/
}
},
themes: {
target: 'html',
default: 'Dark',
list: [
{
name: 'Dark',
class: 'theme-dark',
color: '#1f2023'
},
{
name: 'Light',
class: 'theme-light',
color: '#fff'
}
],
clearable: false
},
},
decorators: [() => ThemeDecorator]
};
export default preview;