GitHub

DaffToastAction

An interface for properties of actions, specifically the DaffButtonComponent, placed inside of the toast.

import { DaffToastAction } from '@daffodil/design/toast'
interface DaffToastAction {
  type: 'raised' | 'underline' | 'stroked' | 'flat' | undefined
  content: string
  size: 'sm' | 'md' | 'lg' | undefined
  color: DaffPalette
  status: DaffStatus
  data: Record<string, any>
  eventEmitter: EventEmitter<DaffToastAction>
}

Properties

Name Type Description
type 'raised' | 'underline' | 'stroked' | 'flat' | undefined

The types of buttons available to be used, as defined in the DaffButtonComponent.

content string

The text for the button

size 'sm' | 'md' | 'lg' | undefined

The size of the button, as defined in the DaffButtonComponent.

color DaffPalette

The color of the button, as defined in the DaffButtonComponent. Color and status should not be used simultaneously.

status DaffStatus

The status of the button, as defined in the DaffButtonComponent. Color and status should not be used simultaneously.

data Record<string, any>
eventEmitter EventEmitter<DaffToastAction>

Sets an EventEmitter on a DaffToastAction