Skip to content

Commit 7be4067

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents d19f1b2 + 1ea6e52 commit 7be4067

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,19 @@ store.addNotification({
196196
})
197197
```
198198

199+
#### Subscribe to notification's removal
200+
201+
Easily subscribe to `onRemoval` by supplying callback as option to the notification object. Callback will get called after the removal animation finishes.
202+
203+
```js
204+
store.addNotification({
205+
...notification,
206+
onRemoval: (id, removedBy) => {
207+
...
208+
}
209+
})
210+
```
211+
199212
#### Pause notification's timeout by hovering
200213

201214
```js
@@ -264,11 +277,6 @@ store.addNotification({
264277
<td><code>Array</code></td>
265278
<td>Custom types</td>
266279
</tr>
267-
<tr>
268-
<td><code>onNotificationRemoval</code></td>
269-
<td><code>Function</code></td>
270-
<td>Gets called on notification removal with <code>id</code> and <code>removedBy</code> arguments</td>
271-
</tr>
272280
</table>
273281

274282
## Options
@@ -284,6 +292,11 @@ store.addNotification({
284292
<td><code>String</code></td>
285293
<td>Id of the notification. Supply option only if you prefer to have custom id, otherwise you should let the component handle generation for you.</td>
286294
</tr>
295+
<tr>
296+
<td><code>onRemoval</code></td>
297+
<td><code>Function</code></td>
298+
<td>Gets called on notification removal with <code>id</code> and <code>removedBy</code> arguments</td>
299+
</tr>
287300
<tr>
288301
<td><code>title</code></td>
289302
<td><code>String</code></td>

0 commit comments

Comments
 (0)