Options
All
  • Public
  • Public/Protected
  • All
Menu

Configuration options for constructing a button within a notification.

Hierarchy

  • ButtonOptions

Index

Properties

cta?: boolean

Indicates that this button will be visually displayed as a 'Call to Action' button. In this case a Call To Action means the button is made more prominent. We recommend you use this for true calls to action. For example, if you have a notification which contains a report, it might have an 'OK' button which takes you to the report, and a 'Dismiss' button which simply closes the notification. We suggest you make only the 'OK' button a CTA here.'

If set as false or undefined, the default simple text button will be used instead.

iconUrl?: string

Optional icon URL, if an icon should be placed on the button.

Icons are placed to the left of the button text.

onClick?: CustomData

Defines the data to be passed back to the application when the button is clicked.

The NotificationActionResult specified here will be returned to the application via a notification-action event when the button is clicked.

If omitted or null, applications will not receive a notification-action event when the button is clicked. This may be appropriate if the button represents a "dismiss" or some other side-effect-free interaction. Even if onClick is omitted or null, a notification-closed event will still be raised after the button click.

Future versions of the service will allow for greater control over what happens when a button is clicked.

submit?: boolean

Indicates that this button should submit a form. If a form is invalid, based on your validation rules provided, the button will be disabled until the users input within the form is valid.

title: string

User-facing button text.

The button caption should be kept short, particularly if there are multiple buttons. Notifications are fixed-width, and all buttons will be displayed on the same row.

type?: "button"

Identifies the type of this control. Additional control types will be added in future versions of the service.

This type declaration is optional, as the other control types will be declared in a slightly different way. Whilst this field is optional when specifiying options, it will be added by the service during creation (see create) - meaning it will always be present when receiving a notification-action event from a button.

Generated using TypeDoc