Skip to content

Commit

Permalink
Document how to customize the layout
Browse files Browse the repository at this point in the history
  • Loading branch information
jide committed Apr 7, 2016
1 parent 19713f0 commit 96c1f18
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,23 @@ module.exports = {
}
```

This can also be used to customize the layout by duplicating the original [layout.js](https://raw.githubusercontent.com/kadirahq/react-storybook/master/src/client/ui/layout.js) file at `.storybook/layout.js` and setting webpack config like this :

```js
const path = require('path');

module.exports = {
plugins: [
new webpack.NormalModuleReplacementPlugin(/^\.\/layout$/, 'custom-layout')
],
resolve: {
alias: {
'custom-layout': path.resolve('.storybook/layout.js')
}
}
}
```

> You can pass options to this config file as you wish. But, there are some stuff like devServer we'll always add by default. <br/>
> So, usually you need to use this config for doing following things:
> * For loading CSS.
Expand Down

0 comments on commit 96c1f18

Please sign in to comment.