1// Check out my online sandbox to see more button props
2// https://codesandbox.io/s/material-ui-button-e809z?file=/src/App.js
3
4import React from 'react';
5import Button from '@material-ui/core/Button';
6
7export default function MaterialuiButton() {
8
9 function handleButtonPress() {
10 console.log("button pressed");
11 }
12
13 return (
14 <Button
15 variant='contained'
16 color='primary'
17 onClick={() => {
18 handleButtonPress();
19 }}
20 >
21 PRESS ME
22 </Button>
23 );
24}
1<Button variant="contained">Default</Button>
2<Button variant="contained" color="primary">
3 Primary
4</Button>
5<Button variant="contained" color="secondary">
6 Secondary
7</Button>
8<Button variant="contained" disabled>
9 Disabled
10</Button>
11<Button variant="contained" color="primary" href="#contained-buttons">
12 Link
13</Button>