feat(storybook): add background options for light and dark themes

- Introduced background parameters in Storybook preview configuration to support light and dark themes.
- Defined specific color values for each theme to enhance visual consistency during component development.
This commit is contained in:
MyPrototypeWhat 2025-11-12 14:26:09 +08:00
parent a2299fa2ab
commit 7dd1ecd4a5

View File

@ -4,6 +4,14 @@ import { withThemeByClassName } from '@storybook/addon-themes'
import type { Preview } from '@storybook/react'
const preview: Preview = {
parameters: {
backgrounds: {
options: {
light: { name: 'Light', value: 'hsla(0, 0%, 97%, 1)' },
dark: { name: 'Dark', value: 'hsla(240, 6%, 10%, 1)' }
}
}
},
decorators: [
withThemeByClassName({
themes: {