feat: Add renderCustomStats prop and expose setToastMessage API via refs to update toast (#3360)

* feat: Add renderCustomStats prop to render extra stats & move storage and version to renderCustomStats

* expose Api to update toast message so single instance of toast is used

* rename to setToastMessage

* update docs
This commit is contained in:
Aakansha Doshi
2021-03-29 20:06:34 +05:30
committed by GitHub
parent 58a7568c9f
commit 0d818f3810
8 changed files with 126 additions and 75 deletions

View File

@ -187,6 +187,10 @@ export interface ExcalidrawProps {
libraryReturnUrl?: string;
theme?: "dark" | "light";
name?: string;
renderCustomStats?: (
elements: readonly NonDeletedExcalidrawElement[],
appState: AppState,
) => JSX.Element;
}
export type SceneData = {