UNPKG

@mantine/dates

Version:

Calendars, date and time pickers based on Mantine components

25 lines (24 loc) 852 B
"use client"; import { useTimePickerContext } from "../TimePicker.context.mjs"; import { TimeValue } from "../../TimeValue/TimeValue.mjs"; import { jsx } from "react/jsx-runtime"; import { UnstyledButton } from "@mantine/core"; //#region packages/@mantine/dates/src/components/TimePicker/TimePresets/TimePresetControl.tsx function TimePresetControl({ value, active, onChange, format, amPmLabels, withSeconds }) { const ctx = useTimePickerContext(); return /* @__PURE__ */ jsx(UnstyledButton, { mod: { active }, onClick: () => onChange(value), ...ctx.getStyles("presetControl"), children: /* @__PURE__ */ jsx(TimeValue, { withSeconds, value, format, amPmLabels }) }); } TimePresetControl.displayName = "@mantine/dates/TimePresetControl"; //#endregion export { TimePresetControl }; //# sourceMappingURL=TimePresetControl.mjs.map