@cerberus-design/react
Version:
The Cerberus Design React component library.
18 lines (13 loc) • 1.23 kB
JavaScript
'use client';
;
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const jsxRuntime = require('react/jsx-runtime');
const parts = require('./parts.cjs');
const viewControlGroup = require('./view-control-group.cjs');
function DatePickerYearView(props) {
return /* @__PURE__ */ jsxRuntime.jsx(parts.DatePickerParts.View, { ...props, view: "year", children: /* @__PURE__ */ jsxRuntime.jsx(parts.DatePickerParts.Context, { children: (datePicker) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
/* @__PURE__ */ jsxRuntime.jsx(viewControlGroup.DatePickerViewControlGroup, {}),
/* @__PURE__ */ jsxRuntime.jsx(parts.DatePickerParts.Table, { children: /* @__PURE__ */ jsxRuntime.jsx(parts.DatePickerParts.TableBody, { children: datePicker.getYearsGrid({ columns: 4 }).map((years, id) => /* @__PURE__ */ jsxRuntime.jsx(parts.DatePickerParts.TableRow, { children: years.map((year, id2) => /* @__PURE__ */ jsxRuntime.jsx(parts.DatePickerParts.TableCell, { value: year.value, children: /* @__PURE__ */ jsxRuntime.jsx(parts.DatePickerParts.TableCellTrigger, { children: year.label }) }, id2)) }, id)) }) })
] }) }) });
}
exports.DatePickerYearView = DatePickerYearView;