Skip to content

Commit

Permalink
Merge pull request #164 from nikkipantony/fix/syntax-error-in-configu…
Browse files Browse the repository at this point in the history
…ration

Change export parameters to export const parameters in README
  • Loading branch information
hipstersmoothie authored Feb 17, 2022
2 parents 18b07c8 + 4c7e64a commit 85b954f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Configure the dark and light mode by adding the following to your `.storybook/pr
```js
import { themes } from '@storybook/theming';

export parameters = {
export const parameters = {
darkMode: {
// Override the default dark theme
dark: { ...themes.dark, appBg: 'black' },
Expand All @@ -55,7 +55,7 @@ Once the initial color scheme has been set, subsequent reloads will use this val
To clear the cached color scheme you have to `localStorage.clear()` in the chrome console.

```js
export parameters = {
export const parameters = {
darkMode: {
// Set the initial theme
current: 'light'
Expand All @@ -71,7 +71,7 @@ This allows you to easily write dark mode aware theme overrides for the storyboo
You can override the classNames applied when switching between light and dark mode using the `darkClass` and `lightClass` parameters.

```js
export parameters = {
export const parameters = {
darkMode: {
darkClass: 'lights-out',
lightClass: 'lights-on'
Expand All @@ -87,7 +87,7 @@ The value will be passed to a `querySelector()` inside the iframe.
This is useful if the `<body>` is styled according to a parent's class, in that case it can be set to `html`.

```js
export parameters = {
export const parameters = {
darkMode: {
classTarget: 'html'
}
Expand All @@ -101,7 +101,7 @@ export parameters = {
This plugin will apply the `darkClass` and `lightClass` classes to the preview iframe if you turn on the `stylePreview` option.

```js
export parameters = {
export const parameters = {
darkMode: {
stylePreview: true
}
Expand Down

0 comments on commit 85b954f

Please sign in to comment.