Skip to content

Commit

Permalink
chore: prepare more fitting dark mode styling for Storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiehenson committed Nov 19, 2024
1 parent cfe4e2a commit 76c079b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .storybook/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,32 @@
var(--double) var(--double),
var(--double) var(--double);
}

.sb-show-main.dark .sbdocs {
@apply bg-neutral-1300;
}

.sb-show-main.dark .sb-bar,
.sb-show-main.dark .sb-anchor > p > code {
@apply bg-neutral-1200;
}

.sb-show-main.dark .docblock-code-toggle {
@apply bg-neutral-1200 text-neutral-000;
}

.sb-show-main.dark .sbdocs h1,
.sb-show-main.dark .sb-anchor > h3,
.sb-show-main.dark .sb-anchor > p,
.sb-show-main.dark .sb-anchor > p > code {
@apply text-neutral-000;
}

.sb-show-main.dark .sbdocs td,
.sb-show-main.dark .sbdocs th {
@apply text-neutral-200;
}

.sb-show-main.dark .sbdocs td {
@apply bg-neutral-1100 text-neutral-200;
}
4 changes: 2 additions & 2 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ const preview = {
brandImage: brandImage,
},
stylePreview: true,
darkClass: ["bg-neutral-1300"],
lightClass: ["bg-neutral-000"],
darkClass: ["dark"],
lightClass: ["light"],
},
},
loaders: [mswLoader],
Expand Down

0 comments on commit 76c079b

Please sign in to comment.