Overriden DayScaleCell component

This commit is contained in:
maciekglowacki 2020-06-05 14:58:52 +02:00
parent 75c6d20657
commit 0054385c42
2 changed files with 13 additions and 8 deletions

View File

@ -15,7 +15,3 @@ display: flex;
font-family: Lato; font-family: Lato;
flex-grow: 1; flex-grow: 1;
} }
.chuj{
padding-top: 20px !important;
padding-bottom: 20px !important;
}

View File

@ -28,7 +28,7 @@ const formatDayScaleDate = (
return momentDate.format(weekday ? "dddd" : " ").toUpperCase(); return momentDate.format(weekday ? "dddd" : " ").toUpperCase();
}; };
const styles = makeStyles((theme: Theme) => const useStyles = makeStyles((theme: Theme) =>
createStyles({ createStyles({
dayScaleCell:{ dayScaleCell:{
backgroundColor:"red" backgroundColor:"red"
@ -36,14 +36,23 @@ const styles = makeStyles((theme: Theme) =>
}), }),
); );
const DayScaleCell = (({ formatDate,classes, ...restProps }: any) => (
//don't know how to set proper type of function arguments
const DayScaleCell = ({ formatDate, ...restProps }: any) => {
const classes = useStyles();
return (
<WeekView.DayScaleCell <WeekView.DayScaleCell
{...restProps} {...restProps}
formatDate={formatDayScaleDate} formatDate={formatDayScaleDate}
today={false} today={false}
className={"chuj"} className={classes.dayScaleCell}
/> />
)); );
}
export default class Calendar extends React.PureComponent< export default class Calendar extends React.PureComponent<
CalendarProps, CalendarProps,