GitHub

DaffToastAction

interface

import { DaffToastAction } from '@daffodil/design/toast'

Configuration for an action button inside a toast. Actions are rendered using DaffButtonComponent.

interface DaffToastAction {
  type: DaffToastActionButtonType
  content: string
  size: DaffToastActionButtonSize
  color: DaffPalette
  status: DaffStatus
  data: Record<string, any>
  eventEmitter: EventEmitter<DaffToastAction>
}

Properties

type
DaffToastActionButtonType

The type of button.

Matches one of the predefined types supported by DaffButtonComponent.

content
string

The text displayed on the button.

size
DaffToastActionButtonSize

The button size.

Matches one of the predefined sizes supported by DaffButtonComponent.

color
DaffPalette

The button color.

Do not use both color and status simultaneously.

status
DaffStatus

The button status.

Do not use both color and status simultaneously.

data
Record<string, any>

Data associated with the action.

eventEmitter
EventEmitter<DaffToastAction>

Emits when the action is triggered.