import React from 'react'; import { IconButton, Typography, Box } from '@mui/material'; interface DayProps { filled?: boolean; outlined?: boolean; highlighted?: boolean; disabled?: boolean; startOfRange?: boolean; endOfRange?: boolean; onClick?: () => void; onHover?: () => void; value: number | string; } const Day: React.FunctionComponent = ({ startOfRange, endOfRange, disabled, highlighted, outlined, filled, onClick, onHover, value, }: DayProps) => { return ( !disabled && highlighted ? theme.palette.primary.light : undefined, }} > !disabled && outlined ? `1px solid ${theme.palette.primary.dark}` : undefined, ...(!disabled && filled ? { '&:hover': { backgroundColor: (theme) => theme.palette.primary.dark, }, backgroundColor: (theme) => theme.palette.primary.dark, } : {}), }} disabled={disabled} onClick={onClick} onMouseOver={onHover} // size="large" > !disabled ? (filled ? theme.palette.primary.contrastText : theme.palette.text.primary) : theme.palette.text.secondary, }} variant="body2" > {value} ); }; export default Day;