// Re-export with a default theme
import { makeStyles } from '@material-ui/core/styles';
// Original module with no default theme
import { makeStyles } from '@material-ui/styles';
import * as React from 'react';
import { StyledEngineProvider } from '@mui/material/styles';
import Box from '@mui/material/Box';
export default function GlobalCssPriority() {
return (
<StyledEngineProvider injectFirst>
<Box className="example"></Box>
</StyledEngineProvider>
);
}
// Styled Engine Provider uses prop injectFirst, which will inject the
// styles at the top precedence and any plain CSS class can be used to
// style the element in question.
import * as React from 'react';
import Box from '@mui/material/Box';
export default function GlobalCssPriority() {
return (
<>
<Box sx={{
width: "30px",
height: "30px",
border: "1px solid red"}}>
marginLeft: "10px"
</Box>
</>
);
}
// sx prop can be used to custom style or override the default syles
// of mui. Inside the object properties can be defined.
// just remember to use camel case for properties with more than
// one word.