Reference Source
import Notification from 'flarum/components/Notification.js'
public class | source

Notification

Extends:

flarum/Component~Component → Notification

The Notification component abstract displays a single notification. Subclasses should implement the icon, href, and content methods.

Props

  • notification

Method Summary

Public Methods
public abstract

content(): VirtualElement

Get the content of the notification.

public abstract

excerpt(): VirtualElement

Get the excerpt of the notification.

public abstract

Get the URL that the notification should link to.

public abstract

Get the name of the icon that should be displayed in the notification.

public

Mark the notification as read.

public

view(): *

Public Methods

public abstract content(): VirtualElement source

Get the content of the notification.

Return:

VirtualElement

public abstract excerpt(): VirtualElement source

Get the excerpt of the notification.

Return:

VirtualElement

public abstract href(): String source

Get the URL that the notification should link to.

Return:

String

public abstract icon(): String source

Get the name of the icon that should be displayed in the notification.

Return:

String

public markAsRead() source

Mark the notification as read.

public view(): * source

Return:

*