SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

toastAction

Runs a toast action's callback on click.

tsx
import { toastAction } from "@sdxc/ui/app";

Signature

typescript
toastAction(toaster: Toaster<unknown>, id: string, onAction: (() => void) | undefined): MixinDescriptor<HTMLButtonElement>

Parameters

ParameterTypeRequiredDescription
toasterToaster<unknown>Yes
idstringYes
onAction(() => void) | undefinedYes

Examples

tsx
<button mix={[toastAction(toaster, id, restore)]}>Undo</button>
@sdxc/ui

Can’t find it? Contact us