From 0054385c421bcf4a93340dad3035d9f7458eb59a Mon Sep 17 00:00:00 2001 From: maciekglowacki Date: Fri, 5 Jun 2020 14:58:52 +0200 Subject: [PATCH] Overriden DayScaleCell component --- src/components/Calendar/index.scss | 4 ---- src/components/Calendar/index.tsx | 17 +++++++++++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/components/Calendar/index.scss b/src/components/Calendar/index.scss index 68fd41e..41bea78 100644 --- a/src/components/Calendar/index.scss +++ b/src/components/Calendar/index.scss @@ -15,7 +15,3 @@ display: flex; font-family: Lato; flex-grow: 1; } -.chuj{ - padding-top: 20px !important; - padding-bottom: 20px !important; - } \ No newline at end of file diff --git a/src/components/Calendar/index.tsx b/src/components/Calendar/index.tsx index bd48b34..cf7a1e7 100644 --- a/src/components/Calendar/index.tsx +++ b/src/components/Calendar/index.tsx @@ -28,7 +28,7 @@ const formatDayScaleDate = ( return momentDate.format(weekday ? "dddd" : " ").toUpperCase(); }; -const styles = makeStyles((theme: Theme) => +const useStyles = makeStyles((theme: Theme) => createStyles({ dayScaleCell:{ 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 ( -)); + ); +} + + + + export default class Calendar extends React.PureComponent< CalendarProps,