react-image-pointer
Version:
A React component for creating interactive images with clickable points and information cards connected by lines. Enhanced with improved modal, better performance, and enhanced interactivity.
39 lines (38 loc) • 707 B
TypeScript
export interface PointInfo {
title: string;
description: string;
}
export interface PointLink {
title: string;
url: string;
}
export interface PointImage {
src: string;
alt: string;
}
export interface Point {
id: number;
x: number;
y: number;
info: PointInfo;
link?: PointLink;
image?: PointImage;
}
export interface ItemDetails {
title: string;
description?: string;
}
export interface ItemData {
details: ItemDetails;
points: Point[];
}
export interface ImagePointedProps {
src: string;
maxHeight?: string;
itemData: ItemData;
isDarkMode?: boolean;
}
export interface ModalProps {
src: string;
onClose: () => void;
}