UNPKG

@cerberus-design/react

Version:

The Cerberus Design React component library.

14 lines (11 loc) 1 kB
'use client'; import { jsx, jsxs, Fragment } from 'react/jsx-runtime'; import { DatePickerParts } from './parts.js'; import { DatePickerViewControlGroup } from './view-control-group.js'; function DatePickerMonthView(props) { return /* @__PURE__ */ jsx(DatePickerParts.View, { ...props, view: "month", children: /* @__PURE__ */ jsx(DatePickerParts.Context, { children: (datePicker) => /* @__PURE__ */ jsxs(Fragment, { children: [ /* @__PURE__ */ jsx(DatePickerViewControlGroup, {}), /* @__PURE__ */ jsx(DatePickerParts.Table, { children: /* @__PURE__ */ jsx(DatePickerParts.TableBody, { children: datePicker.getMonthsGrid({ columns: 4, format: "short" }).map((months, id) => /* @__PURE__ */ jsx(DatePickerParts.TableRow, { children: months.map((month, id2) => /* @__PURE__ */ jsx(DatePickerParts.TableCell, { value: month.value, children: /* @__PURE__ */ jsx(DatePickerParts.TableCellTrigger, { children: month.label }) }, id2)) }, id)) }) }) ] }) }) }); } export { DatePickerMonthView };