feat: migrate visual fixtures to storybook

This commit is contained in:
2026-09-08 21:43:26 -04:00
parent 41efdfe041
commit f7534d901b
69 changed files with 62947 additions and 589 deletions
+20
View File
@@ -0,0 +1,20 @@
import { fileURLToPath } from 'node:url';
export default {
stories: ['../src/**/*.stories.js'],
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y'],
framework: {
name: '@storybook/vue3-vite',
options: {},
},
viteFinal: async (config) => ({
...config,
resolve: {
...config.resolve,
alias: {
...config.resolve?.alias,
'@': fileURLToPath(new URL('../src', import.meta.url)),
},
},
}),
};
+26
View File
@@ -0,0 +1,26 @@
import '../src/assets/styles/global.scss';
export const globalTypes = {
theme: {
description: 'Global color theme',
defaultValue: 'light',
toolbar: {
icon: 'paintbrush',
items: ['light', 'dark'],
dynamicTitle: true,
},
},
};
export const decorators = [
(story, context) => {
document.documentElement.dataset.theme = context.globals.theme;
return story();
},
];
export const parameters = {
controls: { expanded: true },
a11y: { test: 'todo' },
layout: 'fullscreen',
};