Hook useNotification
Arguments
| Arguments | Type | Meaning |
|---|---|---|
| - | - | - |
Return
| Element | Type | Meaning |
|---|---|---|
| addNotification | function | Add notification |
| removeNotification | function | Remove notification by id |
addNotification(obj)
| Arguments | Type |
|---|---|
| title | string |
| message | string |
| type | success / danger / info / default / warning |
| duration | duration |
removeNotification(id)
| Arguments | Type |
|---|---|
| id | string |
Example
const { addNotification, removeNotification } = useNotification()