Overriden DayScaleCell component
This commit is contained in:
		@@ -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;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
@@ -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,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user