Skip to content

Commit

Permalink
feat(storybook): configured themes
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-segning committed Jan 3, 2025
1 parent 11ddbc0 commit f4e086a
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { withThemeByClassName } from '@storybook/addon-themes';
import { withThemeByDataAttribute } from '@storybook/addon-themes';
import type { Preview } from '@storybook/react';
import '../src/index.scss';

Expand All @@ -11,17 +11,16 @@ const preview: Preview = {
},
},
},

decorators: [
withThemeByClassName({
withThemeByDataAttribute({
themes: {
// nameOfTheme: 'classNameForTheme',
light: '',
dark: 'dark',
light: 'vymalo-light',
dark: 'vymalo-dark',
},
defaultTheme: 'light',
defaultTheme: 'vymalo-light',
attributeName: 'data-theme',
}),
],
};

export default preview;
export default preview;

0 comments on commit f4e086a

Please sign in to comment.