mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-04 12:40:10 +00:00
feat: new tooltip
This commit is contained in:
12
src/hooks/use-tooltip.tsx
Normal file
12
src/hooks/use-tooltip.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { useContext } from "react";
|
||||
import { TooltipContext } from "@/context/tooltip-context";
|
||||
|
||||
export const useTooltip = () => {
|
||||
const context = useContext(TooltipContext);
|
||||
if (context === undefined) {
|
||||
throw new Error("useTooltip must be used within a TooltipProvider");
|
||||
}
|
||||
return context;
|
||||
};
|
||||
|
||||
export default useTooltip;
|
||||
Reference in New Issue
Block a user