Profectus / game/notifications / createDismissableNotify
Function: createDismissableNotify() ​
createDismissableNotify(
element,shouldNotify):Ref<boolean>
Create a boolean ref that will automatically be set based on the given condition, but also dismissed when hovering over a given element, typically the element where acting upon the notification would take place.
Parameters ​
element ​
The element that will dismiss the notification on hover.
shouldNotify ​
A function or ref that determines if the notif should be active currently or not.
Ref<boolean, boolean> | () => boolean
Returns ​
Ref<boolean>