UNPKG

@ta-interaktiv/react-annotated-content

Version:

Component to render annotations above other content

33 lines 987 B
import React from 'react'; import { ReactNode } from 'react'; import { ConnectorSpecs, ShapeStyle } from './types'; interface BaseAnnotation { pos: { x: number; y: number; }; id?: string; } interface CustomAnnotation extends BaseAnnotation { type: 'custom'; content: React.ReactNode; className?: string; style?: React.CSSProperties; width?: number; height?: number; } interface StandardAnnotation extends BaseAnnotation { type?: never; content: React.ReactNode; } export type Annotation = CustomAnnotation | StandardAnnotation; export interface AnnotatedImageProps { children: ReactNode; annotations: Array<Annotation>; className?: string; shapeStyle?: ShapeStyle; connectorStyle?: ConnectorSpecs; } export declare const AnnotatedContent: ({ children, annotations, className, connectorStyle, shapeStyle, }: AnnotatedImageProps) => React.JSX.Element; export {}; //# sourceMappingURL=AnnotatedContent.d.ts.map