cockpit-plugin-base-react - v1.1.1
    Preparing search index...

    Interface ToastContextValue

    Context value exposed by ToastProvider and consumed by useToast.

    interface ToastContextValue {
        addToast: (variant: ToastVariant, title: string, body?: string) => void;
        error: (title: string, body?: string) => void;
        info: (title: string, body?: string) => void;
        success: (title: string, body?: string) => void;
        warn: (title: string, body?: string) => void;
    }
    Index

    Properties

    addToast: (variant: ToastVariant, title: string, body?: string) => void

    Adds a toast with an explicit variant.

    error: (title: string, body?: string) => void

    Shorthand for addToast("danger", ...).

    info: (title: string, body?: string) => void

    Shorthand for addToast("info", ...).

    success: (title: string, body?: string) => void

    Shorthand for addToast("success", ...).

    warn: (title: string, body?: string) => void

    Shorthand for addToast("warning", ...).