Skip to content

Commit

Permalink
docs: enable dark mode in storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
fand committed Aug 15, 2024
1 parent 63927a2 commit e123e1d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions packages/docs/.storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { addons } from "@storybook/manager-api";
import { themes } from "@storybook/theming";

addons.setConfig({
theme: themes.dark,
});
9 changes: 7 additions & 2 deletions packages/docs/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/** @type { import('@storybook/html').Preview } */
const preview = {
import { Preview } from "@storybook/html";
import { themes } from "@storybook/theming";

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
docs: {
theme: themes.dark,
},
},
};

Expand Down
2 changes: 2 additions & 0 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"@storybook/blocks": "^8.2.9",
"@storybook/html": "^8.2.9",
"@storybook/html-vite": "^8.2.9",
"@storybook/manager-api": "^8.2.9",
"@storybook/test": "^8.2.9",
"@storybook/theming": "^8.2.9",
"@types/dedent": "^0.7.2",
"@types/is-mobile": "^2.1.4",
"@types/lodash.debounce": "^4.0.9",
Expand Down

0 comments on commit e123e1d

Please sign in to comment.