@cerberus-design/react
Version:
The Cerberus Design React component library.
42 lines (40 loc) • 1.45 kB
JavaScript
import {
DatePickerParts
} from "./chunk-BXDQ5AXV.js";
import {
IconButton
} from "./chunk-ZFVQQJIQ.js";
import {
Button
} from "./chunk-JIEN2PM7.js";
import {
useCerberusContext
} from "./chunk-GITT5645.js";
// src/components/date-picker/view-control-group.tsx
import { css } from "styled-system/css";
import { jsx, jsxs } from "react/jsx-runtime";
function DatePickerViewControlGroup(props) {
const { icons } = useCerberusContext();
const { calendarPrev: PrevIcon, calendarNext: NextIcon } = icons;
return /* @__PURE__ */ jsxs(DatePickerParts.ViewControl, { ...props, children: [
/* @__PURE__ */ jsx(DatePickerParts.PrevTrigger, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { ariaLabel: "Previous", size: "sm", children: /* @__PURE__ */ jsx(PrevIcon, {}) }) }),
/* @__PURE__ */ jsx(DatePickerParts.ViewTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
Button,
{
className: css({
h: "2rem",
paddingInline: "md"
}),
shape: "rounded",
size: "sm",
usage: "ghost",
children: /* @__PURE__ */ jsx(DatePickerParts.RangeText, {})
}
) }),
/* @__PURE__ */ jsx(DatePickerParts.NextTrigger, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { ariaLabel: "Next", size: "sm", children: /* @__PURE__ */ jsx(NextIcon, {}) }) })
] });
}
export {
DatePickerViewControlGroup
};
//# sourceMappingURL=chunk-X24O5DTP.js.map