mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-05 13:10:09 +00:00
feat: new tooltip
This commit is contained in:
20
src/context/tooltip-context.ts
Normal file
20
src/context/tooltip-context.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { createContext } from "react";
|
||||
|
||||
export interface TooltipData {
|
||||
centroid: [number, number];
|
||||
country: string;
|
||||
count: number;
|
||||
servers: Array<{
|
||||
name: string;
|
||||
status: boolean;
|
||||
}>;
|
||||
}
|
||||
|
||||
interface TooltipContextType {
|
||||
tooltipData: TooltipData | null;
|
||||
setTooltipData: (data: TooltipData | null) => void;
|
||||
}
|
||||
|
||||
export const TooltipContext = createContext<TooltipContextType | undefined>(
|
||||
undefined,
|
||||
);
|
||||
Reference in New Issue
Block a user