UNPKG

@abbl/material-calendar

Version:

Calendar component build with React and Material-UI

12 lines 578 B
import { Typography } from '@material-ui/core'; import { isToday } from 'date-fns'; import React from 'react'; import useLocale from '../../../../common/hooks/locale/useLocale'; export default function DayHeaderLabel(props) { var locale = useLocale(); function getDayLabelColor() { return isToday(props.highlightDate) ? 'primary' : 'textSecondary'; } return (React.createElement(Typography, { color: getDayLabelColor(), variant: "body1" }, locale.daysShort[props.highlightDate.getDay()].toLocaleUpperCase())); } //# sourceMappingURL=DayHeaderLabel.js.map