Skip to content

Commit

Permalink
Merge pull request #141 from PaulFasola/patch-1
Browse files Browse the repository at this point in the history
README: added "themes" import origin
  • Loading branch information
hipstersmoothie authored Mar 8, 2021
2 parents 59b30e7 + 54da180 commit 50097d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ module.exports = {
Configure the dark and light mode by adding the following to your `.storybook/preview.js` file:

```js
import { themes } from '@storybook/theming';

export parameters = {
darkMode: {
// Override the default dark theme
Expand Down Expand Up @@ -120,6 +122,8 @@ export const decorators = [renderStory => <ThemeWrapper>{renderStory()}</ThemeWr
If you want to have you UI's dark mode separate from you components' dark mode, implement this global decorator:

```js
import { themes } from '@storybook/theming';

// Add a global decorator that will render a dark background when the
// "Color Scheme" knob is set to dark
const knobDecorator = (storyFn) => {
Expand Down

0 comments on commit 50097d4

Please sign in to comment.