Salta ai contenuti
Magma Design System
Push notification item<mds-push-notification-item>Generato da @maggioli-design-system/magma@2.3.0dist/documentation.json. Incapsulamento: shadow.
Questa pagina è generata dai pacchetti Magma, documentati solo in inglese.
I componenti Magma sono web component: elementi personalizzati che scrivi come i tag HTML, con qualsiasi framework o senza. Le proprietà li configurano, gli eventi dicono cosa è successo, i metodi sono funzioni da chiamare sull'elemento e gli slot accolgono il contenuto che metti al suo interno.
Proprietà
Imposta una proprietà come attributo HTML nel markup, oppure come proprietà da JavaScript. La colonna Attributo dà il nome dell'attributo, un trattino quando coincide con la proprietà; le proprietà senza attributo, come array e funzioni, si impostano solo da JavaScript. Per spegnere un attributo booleano, rimuovilo: non scrivere mai disabled="false".dateFormatdate-formatstringtimeagoSpecifies if the notification date format shows time passed or displays date as a static string
datetime - string | undefinedSpecifies the notification date based on standard ISO 8601.
deletable - boolean | undefinedfalseSpecifies if the component is dismissable; when set, a dismiss button is shown.
icon - string | undefinedSpecifies the icon to be displayed
initials - string | undefinedThe user’s inizials displayed if there’s no image available, initials will override tone and variant senttings to keep user recognizable from others
message - stringNessun messaggio disponibileSpecifies the message of the component
preview - avatar | image | undefinedimageSpecifies if the src attribute is used to show a the image as avatar or full image
src - string | undefinedSpecifies the path to the image
subject - string | undefinedSpecifies the subject of the component
tone - strong | weak | undefinedweakSpecifies the color tone of the component
variant - amaranth | aqua | blue | error | green | info | lime | orange | orchid | primary | purple | red | sky | success | violet | warning | yellow | undefinedSpecifies the color variant of the component
Eventi
mdsPushNotificationItemCloseMdsPushNotificationItemEventDetailEmits when the component is closed
Slot
Gli slot accolgono il contenuto che scrivi tra i tag del componente. Il contenuto di uno slot con nome va su un figlio diretto, con il nome dello slot nell'attributo slot, ad esempio slot="action".actionAdd HTML elements or components, it is recommended to use mds-button element.
badgeAdd HTML elements or components, it is recommended to use mds-badge element.