Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

124
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda