@abbl/material-calendar
Version:
Calendar component build with React and Material-UI
14 lines • 676 B
JavaScript
import Typography from '@material-ui/core/Typography';
import React from 'react';
import useLocale from '../../../common/hooks/locale/useLocale';
export default function NavigationBarDateText(props) {
var locale = useLocale();
function getText() {
if (props.highlightDateDescription) {
return props.highlightDateDescription(props.highlightDate);
}
return String(locale.months[props.highlightDate.getMonth()] + ' ' + props.highlightDate.getFullYear());
}
return (React.createElement(Typography, { align: "center", variant: "h5", style: { display: 'inline' } }, getText()));
}
//# sourceMappingURL=NavigationBarDateText.js.map