-
-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Over the next few versions I think it would great to expand the API methods available, allowing certain settings to be changed at run time, rather than needing to recreate the component. The below are ideas for the notification, any other ideas please just comment!
hide()- Hides the notificationshow()- Shows the notificationtoggle()- Toggles the visibility of the notificationtype(new_type: string)- Changes the notification's type, adjusting the CSS classes appliedbody(new_body: string)- Changes the body of the notificationisVisible(): boolean- Returns true if the notification is visible, false otherwisedismissable(new_state: boolean)- Sets if the message is dismissable, returns the current value if no parameters are provideddismissInterval(new_value: number)- Sets the message's dismiss interval, returns the current value if no parameters are provideddestroyOnDismiss(new_state: boolean)- Sets if the message is destroyed when dismissed, returns the current value if no parameters are providedsize(new_value: string)- Sets the size of the message, returns the current value if no parameters are providedtrigger(event_name: string)- This will trigger the provided event on the notification instance. Note: This wouldn't be restricted to documented events, so could be used for handling custom events
The current color property will be renamed to type to keep in line with the class names. is-primary is a type not a color.
Reactions are currently unavailable