@codecademy/gamut

68.2.268.2.3-alpha.794432.0
dist/DatePicker/Calendar/CalendarNavLastMonth.js
+dist/DatePicker/Calendar/CalendarNavLastMonth.jsNew file
+30
Index: package/dist/DatePicker/Calendar/CalendarNavLastMonth.js
===================================================================
--- package/dist/DatePicker/Calendar/CalendarNavLastMonth.js
+++ package/dist/DatePicker/Calendar/CalendarNavLastMonth.js
@@ -0,0 +1,30 @@
+import { MiniChevronLeftIcon } 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 CalendarNavLastMonth = ({
+  displayDate,
+  onDisplayDateChange,
+  onLastMonthClick,
+  locale
+}) => {
+  const resolvedLocale = useResolvedLocale(locale);
+  const {
+    lastMonth
+  } = getRelativeMonthLabels(resolvedLocale);
+  const handleLastMonth = () => {
+    const lastMonth = new Date(displayDate.getFullYear(), displayDate.getMonth() - 1, 1);
+    onDisplayDateChange?.(lastMonth);
+    onLastMonthClick?.();
+  };
+  return /*#__PURE__*/_jsx(IconButton, {
+    alignSelf: "flex-start",
+    "aria-label": lastMonth,
+    icon: MiniChevronLeftIcon,
+    size: "small",
+    tip: lastMonth,
+    onClick: handleLastMonth
+  });
+};
\ No newline at end of file