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 e425ee8
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,25 @@ module.exports = {
}
```

### Customizing The UI

You can customize the UI by duplicating the original components such as [layout.js](https://raw.githubusercontent.com/kadirahq/react-storybook/master/src/client/ui/layout.js) file, put it in `.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 e425ee8

Please sign in to comment.