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
+17
@@ -0,0 +1,17 @@
|
||||
"use client";
|
||||
import { createContext, useContext } from "react";
|
||||
//#region src/ui/tooltip/context.tsx
|
||||
const TooltipContext = createContext(null);
|
||||
const TooltipContextProvider = TooltipContext.Provider;
|
||||
function useTooltipContext() {
|
||||
const ctx = useContext(TooltipContext);
|
||||
if (!ctx) throw new Error("Tooltip compound components must be used within a Tooltip.Root");
|
||||
return ctx;
|
||||
}
|
||||
function useOptionalTooltipContext() {
|
||||
return useContext(TooltipContext);
|
||||
}
|
||||
//#endregion
|
||||
export { TooltipContextProvider, useOptionalTooltipContext, useTooltipContext };
|
||||
|
||||
//# sourceMappingURL=context.js.map
|
||||
Reference in New Issue
Block a user