@veracity/vui
Version:
Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.
53 lines (51 loc) • 1.5 kB
JavaScript
import { cs } from "../../utils/styles.js";
import { Box } from "../../box/box.js";
import { IconButton } from "../../button/buttons.js";
import { TimeUnitHeader } from "./timeUnitHeader.js";
import { jsx, jsxs } from "react/jsx-runtime";
//#region src/calendar/components/calendarHeader.tsx
const size = 40;
/**
* Header for the calendar
*/
const CalendarHeader = ({ nextDisabled, onChangeViewItem, onSetTimeUnitMode, prevDisabled, timeUnitMode, viewMonth }) => /* @__PURE__ */ jsxs(Box, {
borderBottom: "1px solid",
borderColor: "sandstone.main",
centerV: true,
className: cs("vui-calendar-header"),
children: [/* @__PURE__ */ jsx(Box, {
className: "vui-calendar-header-left",
children: /* @__PURE__ */ jsx(TimeUnitHeader, {
onSetTimeUnitMode,
timeUnitMode,
viewMonth
})
}), /* @__PURE__ */ jsxs(Box, {
className: "vui-calendar-header-right",
flex: "1",
justifyContent: "right",
children: [/* @__PURE__ */ jsx(IconButton, {
"aria-label": "previous",
className: "icon",
disabled: prevDisabled,
h: size,
icon: "uiChevronLeft",
onClick: () => onChangeViewItem("prev"),
size: "sm",
w: size
}), /* @__PURE__ */ jsx(IconButton, {
"aria-label": "next",
className: "icon",
disabled: nextDisabled,
h: size,
icon: "uiChevronRight",
onClick: () => onChangeViewItem("next"),
size: "sm",
w: size
})]
})]
});
//#endregion
export { CalendarHeader };
globalThis.__vuiVersion__ = "5.3.1"
//# sourceMappingURL=calendarHeader.js.map