@@ -72,11 +72,11 @@ const buttons = [
72
72
name: ' NON-DISMISSABLE' ,
73
73
code: ` toast.push('Where the close btn?!?', {
74
74
initial: 0,
75
- progress : 0,
75
+ next : 0,
76
76
dismissable: false
77
77
})` ,
78
78
run : () => {
79
- toast .push (' Where the close btn?!?' , { initial: 0 , progress : 0 , dismissable: false })
79
+ toast .push (' Where the close btn?!?' , { initial: 0 , dismissable: false })
80
80
}
81
81
},
82
82
{
@@ -95,10 +95,10 @@ toast.pop(id)`,
95
95
name: ' FLIP PROGRESS BAR' ,
96
96
code: ` toast.push('Progress bar is flipped', {
97
97
initial: 0,
98
- progress : 1
98
+ next : 1
99
99
})` ,
100
100
run : () => {
101
- toast .push (' Progress bar is flipped' , { initial: 0 , progress : 1 })
101
+ toast .push (' Progress bar is flipped' , { initial: 0 , next : 1 })
102
102
}
103
103
},
104
104
{
@@ -108,32 +108,32 @@ toast.pop(id)`,
108
108
const id = toast.push('Loading, please wait...', {
109
109
duration: 300,
110
110
initial: 0,
111
- progress : 0,
111
+ next : 0,
112
112
dismissable: false
113
113
})
114
114
115
115
await sleep(500)
116
- toast.set(id, { progress : 0.1 })
116
+ toast.set(id, { next : 0.1 })
117
117
118
118
await sleep(3000)
119
- toast.set(id, { progress : 0.7 })
119
+ toast.set(id, { next : 0.7 })
120
120
121
121
await sleep(1000)
122
- toast.set(id, { msg: 'Just a bit more', progress : 0.8 })
122
+ toast.set(id, { msg: 'Just a bit more', next : 0.8 })
123
123
124
124
await sleep(2000)
125
- toast.set(id, { progress : 1 })` ,
125
+ toast.set(id, { next : 1 })` ,
126
126
run: async () => {
127
127
const sleep = t => new Promise (resolve => setTimeout (resolve, t))
128
- const id = toast .push (' Loading, please wait...' , { duration: 300 , initial: 0 , progress : 0 , dismissable: false })
128
+ const id = toast .push (' Loading, please wait...' , { duration: 300 , initial: 0 , dismissable: false })
129
129
await sleep (500 )
130
- toast .set (id, { progress : 0.1 })
130
+ toast .set (id, { next : 0.1 })
131
131
await sleep (3000 )
132
- toast .set (id, { progress : 0.7 })
132
+ toast .set (id, { next : 0.7 })
133
133
await sleep (1000 )
134
- toast .set (id, { msg: ' Just a bit more' , progress : 0.8 })
134
+ toast .set (id, { msg: ' Just a bit more' , next : 0.8 })
135
135
await sleep (2000 )
136
- toast .set (id, { progress : 1 })
136
+ toast .set (id, { next : 1 })
137
137
}
138
138
},
139
139
{
@@ -244,17 +244,10 @@ toast.pop(0)`,
244
244
})` ,
245
245
run : () => {
246
246
toast .push ({
247
- component: {
248
- src: DummyComponent,
249
- props: {
250
- title: ' A Dummy Cookie Component'
251
- }
252
- },
247
+ component: { src: DummyComponent, props: { title: ' A Dummy Cookie Component' } },
253
248
dismissable: false ,
254
249
initial: 0 ,
255
- theme: {
256
- ' --toastMsgPadding' : ' 0'
257
- }
250
+ theme: { ' --toastMsgPadding' : ' 0' }
258
251
})
259
252
}
260
253
}
0 commit comments