This commit is contained in:
19
.storybook/main.ts
Normal file
19
.storybook/main.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import type { StorybookConfig } from '@storybook/react-vite';
|
||||
|
||||
const config: StorybookConfig = {
|
||||
stories: ['../src/**/*.stories.@(ts|tsx|mdx)'],
|
||||
addons: [
|
||||
'@storybook/addon-docs',
|
||||
'@storybook/addon-a11y',
|
||||
'@storybook/addon-themes'
|
||||
],
|
||||
framework: {
|
||||
name: '@storybook/react-vite',
|
||||
options: {}
|
||||
},
|
||||
docs: {
|
||||
autodocs: 'tag'
|
||||
}
|
||||
};
|
||||
|
||||
export default config;
|
||||
8
.storybook/preview.css
Normal file
8
.storybook/preview.css
Normal file
@@ -0,0 +1,8 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
body {
|
||||
background-color: var(--bg-page);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
27
.storybook/preview.tsx
Normal file
27
.storybook/preview.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { Preview } from '@storybook/react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import '@mdxeditor/editor/style.css';
|
||||
import './preview.css';
|
||||
import '../src/styles/base.css';
|
||||
import '../src/styles/components.css';
|
||||
|
||||
const preview: Preview = {
|
||||
decorators: [
|
||||
(Story) => (
|
||||
<MemoryRouter>
|
||||
<Story />
|
||||
</MemoryRouter>
|
||||
)
|
||||
],
|
||||
parameters: {
|
||||
controls: {
|
||||
matchers: {
|
||||
color: /(background|color)$/i,
|
||||
date: /Date$/i
|
||||
}
|
||||
},
|
||||
layout: 'centered'
|
||||
}
|
||||
};
|
||||
|
||||
export default preview;
|
||||
Reference in New Issue
Block a user