materila ui button code example
Example 1: 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>
);
}
Example 2: button material ui
<Button variant="contained">Default</Button>
<Button variant="contained" color="primary">
Primary
</Button>
<Button variant="contained" color="secondary">
Secondary
</Button>
<Button variant="contained" disabled>
Disabled
</Button>
<Button variant="contained" color="primary" href="#contained-buttons">
Link
</Button>