-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClickingButton.js
43 lines (37 loc) · 879 Bytes
/
ClickingButton.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import React from 'react';
import { makeStyles, withStyles} from '@material-ui/core/styles';
import Button from '@material-ui/core/Button';
import { orange, teal } from "@material-ui/core/colors";
const ColorButton = withStyles((theme) => ({
root: {
color: theme.palette.getContrastText(teal[500]),
backgroundColor: orange[500],
"&:hover": {
backgroundColor:teal[700],
},
},
}))(Button)
const useStyles = makeStyles((theme) => ({
root: {
'& > *': {
margin: theme.spacing(1),
},
},
}));
function ClickingButton(props) {
const classes = useStyles();
return (
<div>
<a href={props.myLink}>
<ColorButton
variant="contained"
color="secondary"
className={classes.margin}
>
{props.myLabel}
</ColorButton>
</a>
</div>
);
}
export default ClickingButton;