Rename Storybook modules (#8112)

The names for Storybook modules have changed in v5.3.0. `config.js` was
renamed to `preview.js`, and addon registration has been moved to
`main.js`.

See here for details: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#from-version-52x-to-53x
feature/default_network_editable
Mark Stacey 5 years ago committed by GitHub
parent 0a0040842c
commit 2be8bf0b0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .storybook/addons.js
  2. 11
      .storybook/config.js
  3. 7
      .storybook/main.js
  4. 0
      .storybook/preview.js

@ -1,2 +0,0 @@
import '@storybook/addon-knobs/register'
import '@storybook/addon-actions/register'

@ -1,11 +0,0 @@
import { configure } from '@storybook/react'
import '../ui/app/css/index.scss'
const req = require.context('../ui/app/components', true, /\.stories\.js$/)
function loadStories () {
require('./decorators')
req.keys().forEach((filename) => req(filename))
}
configure(loadStories, module)

@ -0,0 +1,7 @@
module.exports = {
stories: ['../ui/app/components/**/*.stories.js'],
addons: [
'@storybook/addon-knobs',
'@storybook/addon-actions',
],
}
Loading…
Cancel
Save