@cerberus-design/react
Version:
The Cerberus Design React component library.
14 lines (11 loc) • 976 B
JavaScript
'use client';
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
import { DatePickerParts } from './parts.js';
import { DatePickerViewControlGroup } from './view-control-group.js';
function DatePickerYearView(props) {
return /* @__PURE__ */ jsx(DatePickerParts.View, { ...props, view: "year", 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.getYearsGrid({ columns: 4 }).map((years, id) => /* @__PURE__ */ jsx(DatePickerParts.TableRow, { children: years.map((year, id2) => /* @__PURE__ */ jsx(DatePickerParts.TableCell, { value: year.value, children: /* @__PURE__ */ jsx(DatePickerParts.TableCellTrigger, { children: year.label }) }, id2)) }, id)) }) })
] }) }) });
}
export { DatePickerYearView };