UNPKG

@cerberus-design/react

Version:

The Cerberus Design React component library.

36 lines (31 loc) 1.65 kB
'use client'; 'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const jsxRuntime = require('react/jsx-runtime'); const css = require('styled-system/css'); const cerberus = require('../../context/cerberus.cjs'); const button$1 = require('../button/button.cjs'); const parts = require('./parts.cjs'); const button = require('../icon-button/button.cjs'); function DatePickerViewControlGroup(props) { const { icons } = cerberus.useCerberusContext(); const { calendarPrev: PrevIcon, calendarNext: NextIcon } = icons; return /* @__PURE__ */ jsxRuntime.jsxs(parts.DatePickerParts.ViewControl, { ...props, children: [ /* @__PURE__ */ jsxRuntime.jsx(parts.DatePickerParts.PrevTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(button.IconButton, { ariaLabel: "Previous", size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(PrevIcon, {}) }) }), /* @__PURE__ */ jsxRuntime.jsx(parts.DatePickerParts.ViewTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx( button$1.Button, { className: css.css({ h: "2rem", paddingInline: "md" }), shape: "rounded", size: "sm", usage: "ghost", children: /* @__PURE__ */ jsxRuntime.jsx(parts.DatePickerParts.RangeText, {}) } ) }), /* @__PURE__ */ jsxRuntime.jsx(parts.DatePickerParts.NextTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(button.IconButton, { ariaLabel: "Next", size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(NextIcon, {}) }) }) ] }); } exports.DatePickerViewControlGroup = DatePickerViewControlGroup;