(params: {
status?: enum,
duration?: number,
content?: string,
}): void
The Message
action is used to display a message to a user.
Parameters
object
status: enum
: Message status type. Defaults tosuccess
. One of:success
error
info
warning
loading
.
duration: number
: Time in seconds before message disappears. The default is 5.content: string
: The content of the message.
Examples
Display a success message:
- id: success_message
type: Message
params:
content: Success
Display an info message that remains visible for 10 seconds:
- id: info_message
type: Message
params:
content: Something happened
status: info
duration: 10
Display an error message that never disappears:
- id: error_message
type: Message
params:
content: Something bad happened
status: error
duration: 0