GitHub

DaffToastAction

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

The configurations for an action button rendered inside a toast displayed using the 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 size of the button.

Matches one of the predefined sizes supported by DaffButtonComponent.

color
DaffPalette

The color of the button.

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>

An event emitter that fires when the action is triggered.