Skip to content

Commit

Permalink
fix(theme-swticher): fix the theme switcher and add theme switch for … (
Browse files Browse the repository at this point in the history
#803)

fix(theme-swticher): fix the theme switcher and add theme switch for …
  • Loading branch information
kodiakhq[bot] authored Sep 15, 2023
2 parents 43a38b4 + 93c749b commit 063561f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .storybook/preview.js → .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import '../src/styles/globals.css'
import { withThemeByDataAttribute } from '@storybook/addon-styling'
import { withThemeByClassName } from '@storybook/addon-styling'

export const decorators = [
withThemeByDataAttribute({
withThemeByClassName({
themes: {
light: 'light',
dark: 'dark',
},
defaultTheme: 'light',
attributeName: 'data-mode',
}),
]
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: ['class', '[data-mode="dark"]'],
darkMode: ['class'],
content: [
'./src/pages/**/*.{js,ts,jsx,tsx}',
'./src/components/**/*.{js,ts,jsx,tsx}',
Expand Down

0 comments on commit 063561f

Please sign in to comment.