Download react-crypto-tracker/src/components/SelectButton.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 778 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-crypto-tracker/src/components/SelectButton.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-crypto-tracker/src/components/SelectButton.js
-
curl -L -o SelectButton.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-crypto-tracker/src/components/SelectButton.js
778 Bytes
| import { makeStyles } from "@material-ui/core"; | |
| const SelectButton = ({ children, selected, onClick }) => { | |
| const useStyles = makeStyles({ | |
| selectbutton: { | |
| border: "1px solid gold", | |
| borderRadius: 5, | |
| padding: 10, | |
| paddingLeft: 20, | |
| paddingRight: 20, | |
| fontFamily: "Montserrat", | |
| cursor: "pointer", | |
| backgroundColor: selected ? "gold" : "", | |
| color: selected ? "black" : "", | |
| fontWeight: selected ? 700 : 500, | |
| "&:hover": { | |
| backgroundColor: "gold", | |
| color: "black", | |
| }, | |
| width: "22%", | |
| // margin: 5, | |
| }, | |
| }); | |
| const classes = useStyles(); | |
| return ( | |
| <span onClick={onClick} className={classes.selectbutton}> | |
| {children} | |
| </span> | |
| ); | |
| }; | |
| export default SelectButton; | |