I am trying to just show Material UI Components with theme in storybook but theme doesn't apply to the components. As shown in the docs I followed them along but it still doesn't work. Here is the code
import { muiTheme } from 'storybook-addon-material-ui'
import { storiesOf, addDecorator } from '@storybook/react';
import React from 'react';
import { theme } from './../src/ui-kit/theme/theme'
import { MyNewButton } from './../src/stories/my-new-button'
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
}
export const decorators = [
muiTheme(theme)
];
storiesOf('Material-UI', module)
.addDecorator(muiTheme([theme]))
.add('First New Button', () => (
<MyNewButton />
))
note: in my visual studio code editor addDecorator from the import says that it is declared but it's value is never used, however I am using it in the code below.
Here is the screenshot of rendered component but without any theme applied.