1
0
mirror of https://github.com/flarum/core.git synced 2025-07-25 10:41:24 +02:00
Files
php-flarum/js/dist-typings/forum/components/Notification.d.ts
flarum-bot c3a684c7ed Bundled output for commit 3537f76eab
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2021-05-12 23:29:46 +00:00

47 lines
1.0 KiB
TypeScript

/**
* The `Notification` component abstract displays a single notification.
* Subclasses should implement the `icon`, `href`, and `content` methods.
*
* ### Attrs
*
* - `notification`
*
* @abstract
*/
export default class Notification extends Component<import("../../common/Component").ComponentAttrs> {
constructor();
/**
* Get the name of the icon that should be displayed in the notification.
*
* @return {String}
* @abstract
*/
icon(): string;
/**
* Get the URL that the notification should link to.
*
* @return {String}
* @abstract
*/
href(): string;
/**
* Get the content of the notification.
*
* @return {VirtualElement}
* @abstract
*/
content(): any;
/**
* Get the excerpt of the notification.
*
* @return {VirtualElement}
* @abstract
*/
excerpt(): any;
/**
* Mark the notification as read.
*/
markAsRead(): void;
}
import Component from "../../common/Component";