@cerberus-design/react
Version:
The Cerberus Design React component library.
20 lines (18 loc) • 1.06 kB
JavaScript
import {
DatePickerViewControlGroup
} from "./chunk-X24O5DTP.js";
import {
DatePickerParts
} from "./chunk-BXDQ5AXV.js";
// src/components/date-picker/year-view.tsx
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
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
};
//# sourceMappingURL=chunk-O4W2BVE7.js.map