@codecademy/gamut
68.2.268.2.3-alpha.794432.0
dist/DatePicker/Calendar/CalendarNavNextMonth.js+
dist/DatePicker/Calendar/CalendarNavNextMonth.jsNew file+30
Index: package/dist/DatePicker/Calendar/CalendarNavNextMonth.js
===================================================================
--- package/dist/DatePicker/Calendar/CalendarNavNextMonth.js
+++ package/dist/DatePicker/Calendar/CalendarNavNextMonth.js
@@ -0,0 +1,30 @@
+import { MiniChevronRightIcon } from '@codecademy/gamut-icons';
+import * as React from 'react';
+import { IconButton } from '../../Button';
+import { useResolvedLocale } from '../utils/locale';
+import { getRelativeMonthLabels } from './utils/format';
+import { jsx as _jsx } from "react/jsx-runtime";
+export const CalendarNavNextMonth = ({
+ displayDate,
+ onDisplayDateChange,
+ onNextMonthClick,
+ locale
+}) => {
+ const resolvedLocale = useResolvedLocale(locale);
+ const {
+ nextMonth
+ } = getRelativeMonthLabels(resolvedLocale);
+ const handleNextMonth = () => {
+ const nextMonth = new Date(displayDate.getFullYear(), displayDate.getMonth() + 1, 1);
+ onDisplayDateChange?.(nextMonth);
+ onNextMonthClick?.();
+ };
+ return /*#__PURE__*/_jsx(IconButton, {
+ alignSelf: "flex-end",
+ "aria-label": nextMonth,
+ icon: MiniChevronRightIcon,
+ size: "small",
+ tip: nextMonth,
+ onClick: handleNextMonth
+ });
+};
\ No newline at end of file