diff --git a/playground/src/components/App.tsx b/playground/src/components/App.tsx index acde3d51..9abfd8e9 100644 --- a/playground/src/components/App.tsx +++ b/playground/src/components/App.tsx @@ -22,7 +22,7 @@ window.toast = toast; class App extends React.Component { state = App.getDefaultState(); - toastId: Id; + toastId: Id = -1; resolvePromise = true; static getDefaultState() { @@ -42,6 +42,11 @@ class App extends React.Component { ...App.getDefaultState() }); + clearLast = () => { + toast.dismiss(this.toastId); + this.toastId = -1; + }; + clearAll = () => toast.dismiss(); showToast = () => { @@ -229,6 +234,11 @@ class App extends React.Component { Update +
  • + +