mirror of
https://github.com/zoriya/v10.git
synced 2026-08-09 23:58:06 +00:00
32 lines
747 B
JavaScript
32 lines
747 B
JavaScript
"use client";
|
|
import { renderElement } from "../../utils/use-render.js";
|
|
import { forwardRef } from "react";
|
|
//#region src/ui/time/time-group.tsx
|
|
/**
|
|
* Container for composed time displays. Renders a `<span>` element.
|
|
*
|
|
* @example
|
|
* ```tsx
|
|
* <Time.Group>
|
|
* <Time.Value type="current" />
|
|
* <Time.Separator />
|
|
* <Time.Value type="duration" />
|
|
* </Time.Group>
|
|
* ```
|
|
*/
|
|
const Group = forwardRef(function Group(componentProps, forwardedRef) {
|
|
const { render, className, style, children, ...elementProps } = componentProps;
|
|
return renderElement("span", {
|
|
render,
|
|
className,
|
|
style
|
|
}, {
|
|
state: {},
|
|
ref: [forwardedRef],
|
|
props: [{ children }, elementProps]
|
|
});
|
|
});
|
|
//#endregion
|
|
export { Group };
|
|
|
|
//# sourceMappingURL=time-group.js.map
|