feat: add storybook config

This commit is contained in:
Wlad Meixner 2025-07-31 10:46:00 +02:00
parent 50f338f9f6
commit 0faa37deed
No known key found for this signature in database
3 changed files with 33 additions and 0 deletions

1
.gitignore vendored
View File

@ -4,5 +4,6 @@ node_modules
*storybook.log
storybook-static
!.storybook
dist

17
.storybook/main.ts Normal file
View File

@ -0,0 +1,17 @@
import type { StorybookConfig } from '@storybook/react-vite';
const config: StorybookConfig = {
stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-onboarding',
'@storybook/addon-a11y',
'@storybook/addon-docs',
'@storybook/addon-vitest',
],
framework: {
name: '@storybook/react-vite',
options: {},
},
};
export default config;

15
.storybook/preview.ts Normal file
View File

@ -0,0 +1,15 @@
import type { Preview } from '@storybook/react';
import '../src/styles.ts';
const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};
export default preview;