react-simple-arrows
Version:
react components which make it simple to draw svg arrows in a react app
25 lines (24 loc) • 551 B
TypeScript
export interface Coordinates {
top: number;
bottom: number;
left: number;
right: number;
}
export interface CoordinatesPerId {
[index: string]: Coordinates;
}
export declare const getCoordinatesFromDiv: ({ div }: {
div: HTMLDivElement;
}) => {
top: number;
bottom: number;
left: number;
right: number;
};
export declare const useCoordinatesPerId: () => {
coordinates: CoordinatesPerId;
setCoordinatesOfDivForId: ({ id, div }: {
id: string;
div: HTMLDivElement | null;
}) => void;
};