ToastConfig

ToastConfig

Configuration for a toast notification.

type ToastConfig = {
  /**
   * The duration, in seconds, to show the toast. 0 if it should
   * show until the user dismisses it. Defaults to 5 seconds.
   */
  duration?: number | undefined;
  /**
   * The message to show in the toast.
   */
  message: string;
  /**
   * Url to an SVG image to use as the icon, for example:
   * "/assets/icons.svg#info-i"
   */
  svgPath?: string | undefined;
  /**
   * The color variant of the toast.
   */
  variant?: EspalierVariant;
  /**
   * Callback fired when the toast is closed.
   */
  onClosed?: (() => void) | undefined;
}

Where does this show?