Try:
First, take a look at this example: https://stackblitz.com/edit/react-bd92xq
import React from 'react';
import { render } from 'react-dom';
import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles';
// Crie seu próprio tema:
const theme = createMuiTheme({
palette: {
primary: {
light: '#757ce8',
main: '#3f50b5',
dark: '#002884',
contrastText: '#fff',
},
secondary: {
light: '#ff7961',
main: '#f44336',
dark: '#ba000d',
contrastText: '#000',
},
third: {
light: '#5fba7d',
main: '#f44336',
dark: '#ba000d',
contrastText: '#000',
},
},
});
function App() {
return (
<MuiThemeProvider theme={theme}>
{/*Lembre de importar o botão*/}
<Button
variant="raised"
color="third" {/*Ou: color={theme.palette.third}*/}
</Button>
</MuiThemeProvider>
);
}
render(<App />, document.querySelector('#app'));
Then you can read some materials:
Friend, the color for
primary
andsecondary
change, but tothird
still gets "blank"– Luiz Roberto Furtuna
You saw this example: https://stackblitz.com/edit/react-bd92xq ?
– Taffarel Xavier
Taffarel, sorry for the delay. Yes... I saw the example, I even managed to do. I don’t know if you noticed, but if I change the
variant
button it does not work... is it manageable? Keep thevariants
standards have as?– Luiz Roberto Furtuna
Really, I saw it. I don’t know how to fix it. Let’s try.
– Taffarel Xavier