Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

127
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda