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

129
Vistas
Material UI v5.4 doesn't like sx or css prop within a ThemeProvider tag

When I try to use an sx prop inside a ThemeProvider tag I am getting the following error:

breakpoints.map is not a function

here is the code:

import { responsiveFontSizes, createTheme } from 
'@mui/material/styles';
import { Box, ThemeProvider } from '@mui/material';
import styled from '@emotion/styled';


let theme = createTheme({
    palette: {
        type: 'dark',
        primary: {
            main: '#3dde7f',
        },
        secondary: {
            main: '#c83737',
        },
        background: {
            default: '#121212',
            paper: '#1a1a1a',
        },
    },
});

theme = responsiveFontSizes(theme);

export default function Main(props) {    
const {accountsStore} = useStores();
return (
    <ThemeProvider theme={theme}>
        <Box sx={{ gridArea: "menu", paddingTop: "40px", marginTop: 
"50px",   maxWidth: "300px" }}>
          <SideNav accountsStore={accountsStore}/>
        </Box>         
    </ThemeProvider>
);
  }

I am able to get it to work with styled components. Any help would greatly appreciated.

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