feat: new tooltip

This commit is contained in:
hamster1963
2024-12-07 21:05:02 +08:00
parent 7d61b66762
commit 67124921a6
12 changed files with 187 additions and 64 deletions

12
src/hooks/use-tooltip.tsx Normal file
View 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;