mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-23 14:06:00 +03:00
a4cd43dbe2
commitfa57e53c9e
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> commitfb185be4b1
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> commitbabd91c87a
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> commit5e0b1929a9
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> commit04099e8c22
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>
46 lines
997 B
JavaScript
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;
|