@mantine/dates
Version:
Calendars, date and time pickers based on Mantine components
26 lines (25 loc) • 871 B
JavaScript
"use client";
import { TimeValue } from "../TimeValue/TimeValue.mjs";
import { useTimeGridContext } from "./TimeGrid.context.mjs";
import { jsx } from "react/jsx-runtime";
import cx from "clsx";
import { UnstyledButton, useMantineTheme } from "@mantine/core";
//#region packages/@mantine/dates/src/components/TimeGrid/TimeGridControl.tsx
function TimeGridControl({ time, active, className, amPmLabels, format, withSeconds, ...others }) {
const ctx = useTimeGridContext();
const theme = useMantineTheme();
return /* @__PURE__ */ jsx(UnstyledButton, {
mod: [{ active }],
...ctx.getStyles("control", { className: cx(theme.activeClassName, className) }),
...others,
children: /* @__PURE__ */ jsx(TimeValue, {
value: time,
format,
amPmLabels,
withSeconds
})
});
}
//#endregion
export { TimeGridControl };
//# sourceMappingURL=TimeGridControl.mjs.map