mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
build(react): build26 from 45504a2b
This commit is contained in:
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
"use client";
|
||||
import { renderElement } from "../../utils/use-render.js";
|
||||
import { useTooltipContext } from "./context.js";
|
||||
import { forwardRef } from "react";
|
||||
//#region src/ui/tooltip/tooltip-label.tsx
|
||||
/** Tooltip body label; defaults to context `content.label` from the linked trigger. */
|
||||
const TooltipLabel = forwardRef(function TooltipLabel({ render, className, style, children, ...elementProps }, forwardedRef) {
|
||||
const { state, stateAttrMap, content } = useTooltipContext();
|
||||
const body = children !== void 0 ? children : content?.label ?? "";
|
||||
return renderElement("span", {
|
||||
render,
|
||||
className,
|
||||
style
|
||||
}, {
|
||||
state,
|
||||
stateAttrMap,
|
||||
ref: forwardedRef,
|
||||
props: [elementProps, { children: body }]
|
||||
});
|
||||
});
|
||||
//#endregion
|
||||
export { TooltipLabel };
|
||||
|
||||
//# sourceMappingURL=tooltip-label.js.map
|
||||
Reference in New Issue
Block a user