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
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 message, any other ideas please just comment!
hide() - Hides the message
show() - Shows the message
toggle() - Toggles the visibility of the message
type(new_type: string) - Changes the message's type, adjusting the CSS classes applied
title(new_title: string) - Changes the title of the message
body(new_body: string) - Changes the body of the message
isVisible(): boolean - Returns true if the notification is visible, false otherwise
dismissable(new_state: boolean) - Sets if the message is dismissable, returns the current value if no parameters are provided
dismissInterval(new_value: number) - Sets the message's dismiss interval, returns the current value if no parameters are provided
destroyOnDismiss(new_state: boolean) - Sets if the message is destroyed when dismissed, returns the current value if no parameters are provided
size(new_value: string) - Sets the size of the message, returns the current value if no parameters are provided
trigger(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 other dismissable components, primarily the notification.
The text was updated successfully, but these errors were encountered:
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 message, any other ideas please just comment!
hide()
- Hides the messageshow()
- Shows the messagetoggle()
- Toggles the visibility of the messagetype(new_type: string)
- Changes the message's type, adjusting the CSS classes appliedtitle(new_title: string)
- Changes the title of the messagebody(new_body: string)
- Changes the body of the messageisVisible(): 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 eventsThe current
color
property will be renamed totype
to keep in line with other dismissable components, primarily the notification.The text was updated successfully, but these errors were encountered: