UNPKG

@awsui/components-react

Version:

AWS UI is a collection of [React](https://reactjs.org/) components that help create intuitive, responsive, and accessible user experiences for web applications. It is developed by Amazon Web Services (AWS). This work is available under the terms of the [A

13 lines (12 loc) 970 B
import React from 'react'; import styles from '../../styles.css.js'; import { renderMonthAndYear } from '../utils/intl'; import HeaderButton from './button'; var CalendarHeader = function (_a) { var baseDate = _a.baseDate, locale = _a.locale, onChangeMonth = _a.onChangeMonth, previousMonthLabel = _a.previousMonthLabel, nextMonthLabel = _a.nextMonthLabel, calendarHasFocus = _a.calendarHasFocus; return (React.createElement("div", { className: styles['calendar-header'] }, React.createElement(HeaderButton, { ariaLabel: previousMonthLabel, isPrevious: true, onChangeMonth: onChangeMonth, focusable: calendarHasFocus }), React.createElement("div", { className: styles['calendar-header-month'], "aria-live": "polite" }, renderMonthAndYear(locale, baseDate)), React.createElement(HeaderButton, { ariaLabel: nextMonthLabel, isPrevious: false, onChangeMonth: onChangeMonth, focusable: calendarHasFocus }))); }; export default CalendarHeader;