38 lines
899 B
TypeScript
38 lines
899 B
TypeScript
import { Card, CardActionArea, CardContent } from "@material-ui/core";
|
|
import React from "react";
|
|
import { makeStyles } from "@material-ui/core/styles";
|
|
import AddIcon from "@material-ui/icons/Add";
|
|
|
|
const useStyles = makeStyles((theme) => ({
|
|
root: {
|
|
width: "100%",
|
|
marginBottom: theme.spacing(1),
|
|
},
|
|
addCardContent: {
|
|
padding: 0,
|
|
},
|
|
addCardIcon: {
|
|
display: "block",
|
|
margin: "auto",
|
|
padding: 12,
|
|
},
|
|
}));
|
|
|
|
interface AddCardProps {
|
|
handleClick?(): void;
|
|
}
|
|
|
|
export default function AddCard(props: AddCardProps): React.ReactElement {
|
|
const classes = useStyles();
|
|
|
|
return (
|
|
<Card className={classes.root}>
|
|
<CardActionArea onClick={props.handleClick}>
|
|
<CardContent color={"textSecondary"} className={classes.addCardContent}>
|
|
<AddIcon className={classes.addCardIcon} />
|
|
</CardContent>
|
|
</CardActionArea>
|
|
</Card>
|
|
);
|
|
}
|