@codecademy/gamut

68.2.268.2.3-alpha.794432.0
dist/DatePicker/Calendar/CalendarFooter.js
+dist/DatePicker/Calendar/CalendarFooter.jsNew file
+57
Index: package/dist/DatePicker/Calendar/CalendarFooter.js
===================================================================
--- package/dist/DatePicker/Calendar/CalendarFooter.js
+++ package/dist/DatePicker/Calendar/CalendarFooter.js
@@ -0,0 +1,57 @@
+import * as React from 'react';
+import { FlexBox } from '../../Box';
+import { TextButton } from '../../Button';
+import { useResolvedLocale } from '../utils/locale';
+import { DEFAULT_DATE_PICKER_TRANSLATIONS } from '../utils/translations';
+import { getRelativeTodayLabel } from './utils/format';
+
+// function formatQuickActionLabel(action: QuickAction): string {
+//   const { num, timePeriod } = action;
+//   const period =
+//     timePeriod === 'day'
+//       ? num === 1
+//         ? 'day'
+//         : 'days'
+//       : timePeriod === 'week'
+//       ? num === 1
+//         ? 'week'
+//         : 'weeks'
+//       : timePeriod === 'month'
+//       ? num === 1
+//         ? 'month'
+//         : 'months'
+//       : num === 1
+//       ? 'year'
+//       : 'years';
+//   return `${num} ${period}`;
+// }
+import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
+export const CalendarFooter = ({
+  onClearDate,
+  onTodayClick,
+  locale,
+  clearText = DEFAULT_DATE_PICKER_TRANSLATIONS.clearText,
+  disabled,
+  showClearButton
+}) => {
+  const resolvedLocale = useResolvedLocale(locale);
+  // const actions = quickActions.slice(0, 3);
+
+  return /*#__PURE__*/_jsxs(FlexBox, {
+    alignItems: "center",
+    borderTop: 1,
+    justifyContent: "space-between",
+    p: 12,
+    children: [showClearButton && /*#__PURE__*/_jsx(TextButton, {
+      disabled: disabled,
+      onClick: () => onClearDate?.(),
+      children: clearText
+    }), /*#__PURE__*/_jsx(FlexBox, {
+      gap: 32,
+      children: /*#__PURE__*/_jsx(TextButton, {
+        onClick: () => onTodayClick?.(),
+        children: getRelativeTodayLabel(resolvedLocale)
+      })
+    })]
+  });
+};
\ No newline at end of file