vuejs addDecorator(withOptions({ name: 'bah', theme: { mainBackground: 'red' } })) does not change storybook page name or color
See original GitHub issueDescribe the bug using addDecorator(withOptions({ name: ‘bah’, theme: { mainBackground: ‘red’ } })) does not affect storybook pages using vuejs.
To Reproduce Steps to reproduce the behavior:
- Write the following to your vue project’s .storybook/config.js:
addDecorator(withOptions({ name: 'bah', theme: { mainBackground: 'red' } })) - run the storybook application and see the page with un-changed name and background.
Expected behavior the name and background should be changed
Screenshots

Code snippets .storybook/config.js
import { configure, addDecorator } from '@storybook/vue';
import { withOptions } from '@storybook/addon-options';
import { themes } from '@storybook/components';
import 'babel-polyfill';
// automatically import all files ending in *.stories.js
const req = require.context( '../stories', true, /.stories.js$/ );
function loadStories () {
req.keys().forEach( filename => req( filename ) );
}
addDecorator(
withOptions({
name: 'bah',
theme: {
mainBackground: 'red'
}
})
);
configure( loadStories, module );
System:
- OS: MacOS
- Device: Macbook Pro 2016
- Browser: Firefox (any)
- Framework: vue
- Addons: “@storybook/vue”: “^4.0.7”, “@storybook/addon-options”: “^4.0.7”
- Version: “storybook”: “1.0.0”
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
vuejs addDecorator(withOptions({ name: 'bah', theme ... - GitHub
Describe the bug using addDecorator(withOptions({ name: 'bah', theme: { mainBackground: 'red' } })) does not affect storybook pages using vuejs.
Read more >How to add a theme switcher to Storybook - JS.ORG
This article shows you how. Use a decorator to pass the theme object to your components; Switch the theme dynamically from the toolbar...
Read more >Setting up storybook with vuetify 2 - Stack Overflow
I've had troubles for a long time setting up vuetify 2.3.3 with Storybook 5.3.19. I'm not sure but it seemed that the vue-cli-plugins ......
Read more >Top 5 @storybook/vue Code Examples - Snyk
Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues...
Read more >Vue.js Development with Storybook and Applitools
At one point in time, the server-side code was responsible for generating and serving every page in our application. Nowadays, Single Page ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Adding
import '@storybook/addon-options/register'to.storybook/addons.jsdid fix this issue.addons.js:
config.js:
@iambumblehead Currently there are only those two pre-made themes, yes. But creating your own should not be too difficult.
If all your problems are resolved regarding the initial issue, then please feel free to close this issue 😃