feat: update toast api to account for duration and closable (#5427)
* feat: update toast api to account for duration and closable * fix * update snaps * update docs * male toast nullable * fix snaps * remove clearToast from App.tsx and replace clearToast prop in Toast comp with onClose
This commit is contained in:
@ -145,7 +145,7 @@ export type AppState = {
|
||||
previousSelectedElementIds: { [id: string]: boolean };
|
||||
shouldCacheIgnoreZoom: boolean;
|
||||
showHelpDialog: boolean;
|
||||
toastMessage: string | null;
|
||||
toast: { message: string; closable?: boolean; duration?: number } | null;
|
||||
zenModeEnabled: boolean;
|
||||
theme: Theme;
|
||||
gridSize: number | null;
|
||||
@ -467,7 +467,7 @@ export type ExcalidrawImperativeAPI = {
|
||||
getAppState: () => InstanceType<typeof App>["state"];
|
||||
getFiles: () => InstanceType<typeof App>["files"];
|
||||
refresh: InstanceType<typeof App>["refresh"];
|
||||
setToastMessage: InstanceType<typeof App>["setToastMessage"];
|
||||
setToast: InstanceType<typeof App>["setToast"];
|
||||
addFiles: (data: BinaryFileData[]) => void;
|
||||
readyPromise: ResolvablePromise<ExcalidrawImperativeAPI>;
|
||||
ready: true;
|
||||
|
Reference in New Issue
Block a user