mirror of
https://github.com/langgenius/dify.git
synced 2026-05-13 08:57:28 +08:00
32 lines
580 B
TypeScript
32 lines
580 B
TypeScript
import type { Preview } from '@storybook/react-vite'
|
|
import { withThemeByDataAttribute } from '@storybook/addon-themes'
|
|
import './storybook.css'
|
|
|
|
export const decorators = [
|
|
withThemeByDataAttribute({
|
|
themes: {
|
|
light: 'light',
|
|
dark: 'dark',
|
|
},
|
|
defaultTheme: 'light',
|
|
attributeName: 'data-theme',
|
|
}),
|
|
]
|
|
|
|
const preview: Preview = {
|
|
parameters: {
|
|
controls: {
|
|
matchers: {
|
|
color: /(background|color)$/i,
|
|
date: /Date$/i,
|
|
},
|
|
},
|
|
docs: {
|
|
toc: true,
|
|
},
|
|
},
|
|
tags: ['autodocs'],
|
|
}
|
|
|
|
export default preview
|