You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
To add a hook that allows usage of the built in notification system: mozilla
Acceptance Criteria
Allows for title input
Allows for description input
Allows for image input
Needs to check permissions with Notification.permission
All other notification properties, specified on mozilla docs.
Returns the events from the notification (close, click, error, show, etc.)
Example usage
import{useNotification}from"react-haiku";//... componentconst{ show, close }=useNotification({title: "Test Notification",//... more properties here});//... in button for example:onClick={()=>{show();}}//... close component
the hook will either show the notification or not at all if the permission is denied.
We could also return the permission status: 'denied' | 'granted' | 'loading' | 'default'
The text was updated successfully, but these errors were encountered:
Description
To add a hook that allows usage of the built in notification system: mozilla
Acceptance Criteria
Notification.permission
Example usage
the hook will either show the notification or not at all if the permission is denied.
We could also return the permission status:
'denied' | 'granted' | 'loading' | 'default'
The text was updated successfully, but these errors were encountered: