feat(ui): migrate to svelte-5 and storybook

This commit is contained in:
2024-11-02 15:15:09 +01:00
parent 9ba26374db
commit a87add30ff
31 changed files with 5926 additions and 1148 deletions

View File

@ -0,0 +1,21 @@
import type { StorybookConfig } from '@storybook/sveltekit';
const config: StorybookConfig = {
"stories": [
"../src/**/*.stories.@(js|ts|svelte)"
],
"addons": [
"@storybook/addon-svelte-csf",
"@storybook/addon-essentials",
"@storybook/addon-themes",
],
"framework": {
"name": "@storybook/sveltekit",
"options": {}
},
docs: {}
};
export default config;

View File

@ -0,0 +1,12 @@
<style>
.sidebar-header {
display: none !important;
}
#downshift-0-label {
display: none !important;
}
#downshift-0-label ~ div {
margin-top: 0 !important;
}
</style>

View File

@ -0,0 +1,29 @@
import { withThemeByClassName } from "@storybook/addon-themes";
import type { Preview } from '@storybook/svelte';
import "../src/lib/app.css";
const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
decorators: [withThemeByClassName({
themes: {
dark: 'theme-dark',
light: 'theme-light',
catppuccin: 'theme-catppuccin',
solarized: 'theme-solarized',
high: 'theme-high-contrast',
nord: 'theme-nord',
dracula: 'theme-dracula',
},
defaultTheme: 'light',
})],
};
export default preview;