This commit is contained in:
parent
56cc37de7e
commit
81633cda04
72 changed files with 1299 additions and 37 deletions
17
packages/theia/.storybook/main.js
Normal file
17
packages/theia/.storybook/main.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/** @type { import('@storybook/sveltekit').StorybookConfig } */
|
||||
const config = {
|
||||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|ts|svelte)'],
|
||||
addons: [
|
||||
'@chromatic-com/storybook',
|
||||
'@storybook/addon-essentials',
|
||||
'@storybook/addon-interactions',
|
||||
'@storybook/addon-styling-webpack',
|
||||
'@storybook/addon-svelte-csf',
|
||||
'@storybook/addon-themes',
|
||||
],
|
||||
framework: {
|
||||
name: '@storybook/sveltekit',
|
||||
options: {},
|
||||
},
|
||||
};
|
||||
export default config;
|
||||
2
packages/theia/.storybook/preview.css
Normal file
2
packages/theia/.storybook/preview.css
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
@import 'tailwindcss';
|
||||
@plugin "daisyui";
|
||||
28
packages/theia/.storybook/preview.js
Normal file
28
packages/theia/.storybook/preview.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import { withThemeByDataAttribute } from '@storybook/addon-themes';
|
||||
import './preview.css';
|
||||
|
||||
/** @type { import('@storybook/svelte').Preview } */
|
||||
const preview = {
|
||||
tags: ['autodocs'],
|
||||
parameters: {
|
||||
controls: {
|
||||
matchers: {
|
||||
color: /(background|color)$/i,
|
||||
date: /Date$/i,
|
||||
},
|
||||
},
|
||||
},
|
||||
decorators: [
|
||||
withThemeByDataAttribute({
|
||||
themes: {
|
||||
light: 'light',
|
||||
dark: 'dark',
|
||||
night: 'night',
|
||||
},
|
||||
defaultTheme: 'dark',
|
||||
attributeName: 'data-theme',
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
export default preview;
|
||||
Loading…
Add table
Add a link
Reference in a new issue