Push notification<mds-push-notification>Generated from @maggioli-design-system/magma@2.3.0dist/documentation.json. Encapsulation: shadow.
Magma components are web components: custom elements you write like HTML tags, with any framework or without one. Props configure them, events tell you what happened, methods are functions you call on the element and slots take the content you put inside it.
Props
Set a prop as an HTML attribute in the markup, or as a property from JavaScript. The Attribute column gives the name of the attribute, a dash when it is the same as the property; props without one, such as arrays and functions, are set from JavaScript only. To turn a boolean attribute off, remove it: never write disabled="false".behavior
-
auto | manual | undefinedautoSpecifies if the component is visible or not.
behavior = manual
should hide when click outside
should hide when all notifications are removed
should show when change visible from component or call show methodbehavior = auto
should hide when all notifications are removed
should show when one or more notifications are added
visible
-
boolean | undefinedSpecifies if the component is visible or not.
Events
mdsPushNotificationChangeMdsPushNotificationEventDetailEmits when the component visibility changes
mdsPushNotificationHidevoidEmits when the component is hidden
mdsPushNotificationShowvoidEmits when the component is shown
Methods
hidehide() => Promise<void>Hides the notification container.
removeNotificationremoveNotification(notification: HTMLMdsPushNotificationItemElement | HTMLMdsPushNotificationItemElement[]) => Promise<void>Removes the given notification item(s) from the stack.
showshow() => Promise<void>Shows the notification container.
Slots
Slots take the content you write between the tags of the component. The default slot, the one without a name, accepts plain text, unless its description says otherwise.(default)Add HTML elements or components, it is recommended to use mds-push-notification element.