Skip to content

Commit

Permalink
Use createGlobal instead of createReset because colors are inherited …
Browse files Browse the repository at this point in the history
…from body

@ndelangen this messes with the grid plugin but setting body background and color is a common pattern to support. e.g., when theming a dark mode ;)
  • Loading branch information
domyen committed Feb 9, 2019
1 parent 07e933f commit 287442a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/official-storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { storiesOf, configure, addDecorator, addParameters } from '@storybook/react';
import { Global, ThemeProvider, themes, createReset } from '@storybook/theming';
import { Global, ThemeProvider, themes, createGlobal } from '@storybook/theming';

import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
import { withCssResources } from '@storybook/addon-cssresources';
Expand Down Expand Up @@ -35,7 +35,7 @@ addDecorator(withNotes);

addDecorator(fn => (
<ThemeProvider theme={themes.normal}>
<Global styles={createReset} />
<Global styles={createGlobal} />
{fn()}
</ThemeProvider>
));
Expand Down

1 comment on commit 287442a

@ndelangen
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When someone is using components that should be displayed on a dark/black background, one can use addon backgrounds?

addon backgrounds actually renders the colour behind the iframe, making it more performant to change from the manager.

backgrounds can easily be set using parameters.

Hope this satisfies the need.

Please sign in to comment.