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

210
Vistas
Can't get custom theme of Material UI to work

I'm trying to create a custom theme for my app using Material UI. Looking on how to do it, I found out I had to use the createTheme and the ThemeProvider. However for some reason, my theme is not overriding the default theme. In the following code you'll be able to see that I try to override the primary color with a brownish color, yeth the default blue still persists.

import {Button} from "@material-ui/core";
import {createTheme, ThemeProvider} from "@material-ui/core"
import {makeStyles} from "@material-ui/core";

const theme = createTheme({
    pallete: {
        primary: {
            main: '#923223'
        }
    }
})

const App = () => {

    return (
        <ThemeProvider theme={theme}>
            <div style={{backgroundColor: '#f8f8f8', height: '100%'}}>
                <Button variant="contained" color="primary">algo</Button>
            </div>
        </ThemeProvider>
    );
}

export default App;

Render:

Button still in blue

Any clue to what's going on?

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