mirror of
https://github.com/ershisan99/flashcards-example-project.git
synced 2026-01-29 21:02:09 +00:00
add dark mode
This commit is contained in:
6
.storybook/manager.js
Normal file
6
.storybook/manager.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import { addons } from '@storybook/manager-api'
|
||||
import { themes } from '@storybook/theming'
|
||||
|
||||
addons.setConfig({
|
||||
theme: themes.dark,
|
||||
})
|
||||
@@ -2,11 +2,24 @@ import '@fontsource/roboto/400.css'
|
||||
import '@fontsource/roboto/700.css'
|
||||
import '../src/styles/index.scss'
|
||||
|
||||
import { themes } from '@storybook/theming'
|
||||
import type { Preview } from '@storybook/react'
|
||||
|
||||
const preview: Preview = {
|
||||
parameters: {
|
||||
actions: { argTypesRegex: '^on[A-Z].*' },
|
||||
docs: {
|
||||
theme: themes.dark,
|
||||
},
|
||||
backgrounds: {
|
||||
default: 'dark',
|
||||
values: [
|
||||
{
|
||||
name: 'dark',
|
||||
value: '#000000',
|
||||
},
|
||||
],
|
||||
},
|
||||
controls: {
|
||||
matchers: {
|
||||
color: /(background|color)$/i,
|
||||
|
||||
Reference in New Issue
Block a user