mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-28 14:50:58 +00:00
32 lines
816 B
JavaScript
32 lines
816 B
JavaScript
'use client';
|
|
import { jsx } from 'react/jsx-runtime';
|
|
import cx from 'clsx';
|
|
import { useMantineTheme, UnstyledButton } from '@mantine/core';
|
|
import { TimeValue } from '../TimeValue/TimeValue.mjs';
|
|
import { useTimeGridContext } from './TimeGrid.context.mjs';
|
|
|
|
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 })
|
|
}
|
|
);
|
|
}
|
|
|
|
export { TimeGridControl };
|
|
//# sourceMappingURL=TimeGridControl.mjs.map
|