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:
Aakansha Doshi
2022-07-11 18:11:13 +05:30
committed by GitHub
parent e885057a71
commit a7153d9d1d
15 changed files with 162 additions and 120 deletions

View File

@@ -77,7 +77,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 200,
@@ -248,7 +248,9 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": "Added to library",
"toast": Object {
"message": "Added to library",
},
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 200,
@@ -426,7 +428,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 200,
@@ -765,7 +767,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 200,
@@ -1104,7 +1106,9 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": "Copied styles.",
"toast": Object {
"message": "Copied styles.",
},
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 200,
@@ -1280,7 +1284,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 200,
@@ -1496,7 +1500,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 200,
@@ -1775,7 +1779,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 200,
@@ -2126,7 +2130,9 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": "Copied styles.",
"toast": Object {
"message": "Copied styles.",
},
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 200,
@@ -2927,7 +2933,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 200,
@@ -3266,7 +3272,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 200,
@@ -3609,7 +3615,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 200,
@@ -4030,7 +4036,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 200,
@@ -4311,7 +4317,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 200,
@@ -4661,7 +4667,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 200,
@@ -4770,7 +4776,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 200,
@@ -4855,7 +4861,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 200,

View File

@@ -85,7 +85,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -602,7 +602,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -1101,7 +1101,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -1964,7 +1964,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -2191,7 +2191,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -2693,7 +2693,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -2967,7 +2967,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -3148,7 +3148,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -3635,7 +3635,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -3896,7 +3896,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -4120,7 +4120,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -4384,7 +4384,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -4661,7 +4661,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -5107,7 +5107,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -5407,7 +5407,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -5730,7 +5730,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -5933,7 +5933,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -6111,7 +6111,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -6620,7 +6620,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -6962,7 +6962,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -9207,7 +9207,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -9607,7 +9607,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -9882,7 +9882,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -10121,7 +10121,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -10423,7 +10423,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -10601,7 +10601,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -10779,7 +10779,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -10957,7 +10957,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -11165,7 +11165,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -11373,7 +11373,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -11599,7 +11599,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -11807,7 +11807,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -11985,7 +11985,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -12193,7 +12193,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -12371,7 +12371,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -12549,7 +12549,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -12786,7 +12786,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -13574,7 +13574,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -13847,7 +13847,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -13954,7 +13954,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -14066,7 +14066,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -14253,7 +14253,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -14596,7 +14596,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -14825,7 +14825,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -15725,7 +15725,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -15836,7 +15836,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -16703,7 +16703,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -17149,7 +17149,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -17422,7 +17422,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -17531,7 +17531,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -18074,7 +18074,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,
@@ -18181,7 +18181,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"width": 1024,

View File

@@ -70,7 +70,7 @@ Object {
"startBoundElement": null,
"suggestedBindings": Array [],
"theme": "light",
"toastMessage": null,
"toast": null,
"viewBackgroundColor": "#ffffff",
"viewModeEnabled": false,
"zenModeEnabled": false,