-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customizing the layout #62
Comments
Could you give us more information? What you are trying to achieve? |
I would like to be able to customize the layout, make the sidebar smaller... I tried to inject css in config.js and use global selectors, but it did not work, and seems hackish anyway. I like to have my code and storybook side by side, and on my screen the current design takes a lot of space. I'm sure there could be many other use cases ! |
I made a PR in case you find this useful. |
If someone is interested, this can already be done using a custom webpack config file : module.exports = {
//...
plugins: [
new webpack.NormalModuleReplacementPlugin(/^\.\/layout$/, 'custom-layout'),
new webpack.NormalModuleReplacementPlugin(/^\.\/controls$/, 'custom-controls')
],
resolve: {
alias: {
'custom-layout': path.resolve('.storybook/layout.js'),
'custom-controls': path.resolve('.storybook/controls.js')
}
}
} |
Great. I added a comment on this PR. #67 |
Fix issue where hot reloaded updates were not rendered
Add react-storybook-addon-chapters
save height of down panel in local storage #62
Implemented tests for maxSize and minSize
I think somebody may find this useful. I achieved layout customization through custom preset that extends managerWebpack config. And then I load my custom header right before the main Storybook view. Key files there are "presets.js" and "custom-header/header-preset.js". See details in commit |
Pass addon version in telemetry event
It would be great to be able to customize the layout / html / css. Something like adding a custom component in .storybook.
The text was updated successfully, but these errors were encountered: