A theme switcher that uses multiple css files containing variables.
.storybook/preview.ts:
{
"parameters": {
"themes": {
"files": {
"Red": "/.storybook/themes/red.css",
"Green": "/.storybook/themes/green.css"
}
}
}
}
To specify a default theme:
{
"parameters": {
"themes": {
"files": {
"Red": "/.storybook/themes/red.css",
"Green": "/.storybook/themes/green.css"
},
"defaultTheme": "Red"
}
}
}