feat: add onLinkOpen component prop (#4694)

Co-authored-by: ad1992 <aakansha1216@gmail.com>
This commit is contained in:
David Luzar 2022-02-08 11:25:35 +01:00 committed by GitHub
parent 050bc1ce2b
commit a066317d3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 128 additions and 32 deletions

View file

@ -247,6 +247,12 @@ export interface ExcalidrawProps {
onLibraryChange?: (libraryItems: LibraryItems) => void | Promise<any>;
autoFocus?: boolean;
generateIdForFile?: (file: File) => string | Promise<string>;
onLinkOpen?: (
element: NonDeletedExcalidrawElement,
event: CustomEvent<{
nativeEvent: MouseEvent | React.PointerEvent<HTMLCanvasElement>;
}>,
) => void;
}
export type SceneData = {