Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

132
Views
Storybook integrating with Material UI

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.enter image description here

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!