import React from "react"; import ChevronRightIcon from "@mui/icons-material/ChevronRight"; import ChevronLeftIcon from "@mui/icons-material/ChevronLeft"; import Button from "@mui/material/Button"; import { Grid, Theme } from "@mui/material"; import { makeStyles } from "@mui/styles"; interface ToolBarProps { children: React.ReactChild; prevMonth: Function; nextMonth: Function; today: Function; setView: (view: "month" | "day" | "list") => void; view: "month" | "day" | "list"; } const useStyles = makeStyles((theme: Theme) => ({ root: { whiteSpace: "nowrap", "&.active": { textDecoration: "none", backgroundColor: theme.palette.action.active, boxShadow: "0px 2px 4px -1px", }, "&:first-child:not(:last-child)": { borderTopRightRadius: 0, borderBottomRightRadius: 0, }, "&:last-child:not(:first-child)": { borderTopLeftRadius: 0, borderBottomLeftRadius: 0, }, "&:not(:first-child):not(:last-child)": { borderRadius: 0, }, }, })); const Toolbar = (props: ToolBarProps) => { const { prevMonth, nextMonth, children, setView, view, today } = props; const classes = useStyles(); return ( {children} ); }; export default Toolbar;