mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-08 22:39:36 +08:00
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:
parent
a2299fa2ab
commit
7dd1ecd4a5
@ -4,6 +4,14 @@ import { withThemeByClassName } from '@storybook/addon-themes'
|
|||||||
import type { Preview } from '@storybook/react'
|
import type { Preview } from '@storybook/react'
|
||||||
|
|
||||||
const preview: Preview = {
|
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: [
|
decorators: [
|
||||||
withThemeByClassName({
|
withThemeByClassName({
|
||||||
themes: {
|
themes: {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user