Skip to content

Commit

Permalink
docs: Update storybook 5.* configuration (#19006)
Browse files Browse the repository at this point in the history
* Update storybook 5.* configuration

The config can be simplified as seen in https://storybook.js.org/docs/guides/guide-react/#step-3-create-the-config-file

* chore: format
  • Loading branch information
selrond authored and pieh committed Oct 25, 2019
1 parent b86c406 commit e231059
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions docs/docs/visual-testing-with-storybook.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ import { action } from "@storybook/addon-actions"

// automatically import all files ending in *.stories.js
// highlight-next-line
const req = require.context("../src", true, /.stories.js$/)
function loadStories() {
req.keys().forEach(filename => req(filename))
}
configure(require.context("../src", true, /\.stories\.js$/), module)

// highlight-start
// Gatsby's Link overrides:
Expand All @@ -56,8 +53,6 @@ global.__PATH_PREFIX__ = ""
window.___navigate = pathname => {
action("NavigateTo:")(pathname)
}

configure(loadStories, module)
// highlight-end
```

Expand Down

0 comments on commit e231059

Please sign in to comment.