Interface describing an action linked to a notification.

interface IAction {
    callback: ((event) => void);
    caption?: string;
    displayType?: ActionDisplayType;
    label: string;
}

Properties

callback: ((event) => void)

Callback function to trigger

Notes

By default execution of the callback will close the toast and dismiss the notification. You can prevent this by calling event.preventDefault() in the callback.

Type declaration

    • (event): void
    • Parameters

      Returns void

caption?: string

The action caption.

This can be a longer description of the action.

displayType?: ActionDisplayType

The action display type.

This will be used to modify the action button style.

label: string

The action label.

This should be a short description.