Skip to content

Commit

Permalink
meta: storybook supports tailwind + theme
Browse files Browse the repository at this point in the history
  • Loading branch information
tomholford committed Jun 9, 2023
1 parent 96a5955 commit cd2aac4
Show file tree
Hide file tree
Showing 5 changed files with 1,945 additions and 0 deletions.
1 change: 1 addition & 0 deletions ui/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const config: StorybookConfig = {
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-styling'
],
framework: {
name: '@storybook/react-vite',
Expand Down
12 changes: 12 additions & 0 deletions ui/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { withThemeByClassName } from "@storybook/addon-styling";
import "../src/styles/index.css";
import type { Preview } from '@storybook/react';

const preview: Preview = {
Expand All @@ -12,4 +14,14 @@ const preview: Preview = {
},
};

export const decorators = [
withThemeByClassName({
themes: {
light: "",
dark: "dark",
},
defaultTheme: "light",
}),
];

export default preview;
Loading

0 comments on commit cd2aac4

Please sign in to comment.