material-ui button colors code example
Example 1: material ui change button to custom color
import React from 'react';
import Button from '@material-ui/core/Button';
const GreenButton = () => {
return(
<Button
style={{backgroundColor: '#12824C', color: '#FFFFFF'}}
>Green</Button>
)
}
export default GreenButton;
Example 2: material-ui button
import React from 'react';
import Button from '@material-ui/core/Button';
export default function MaterialuiButton() {
function handleButtonPress() {
console.log("button pressed");
}
return (
<Button
variant='contained'
color='primary'
onClick={() => {
handleButtonPress();
}}
>
PRESS ME
</Button>
);
}