how to use default theme colors like "primary" or "secondary" in sx property? I don't want to change them, I just want to write sx={{ backgroundColor: "primary" }} or smth like that
how to use default theme colors like "primary" or "secondary" in sx property? I don't want to change them, I just want to write sx={{ backgroundColor: "primary" }} or smth like that
You need to be a bit more specific which color you want:
For example to access priamry.main, use:
<Box sx={{ borderColor: 'primary.main' }} />
or for the current text color:
<Box sx={{ color: 'text.secondary' }}>Sessions</Box>
More information