/** * * Toast is used to display messages in an overlay. * * [Live Demo](https://www.primevue.org/toast/) * * @module toast * */ import { ButtonHTMLAttributes, VNode } from 'vue'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; export interface ToastMessageOptions { /** * Severity level of the message. * Default value is 'info'. */ severity?: 'success' | 'info' | 'warn' | 'error' | undefined; /** * Summary content of the message. */ summary?: string | undefined; /** * Detail content of the message. */ detail?: any | undefined; /** * Whether the message can be closed manually using the close icon. * Default value is true. */ closable?: boolean | undefined; /** * Delay in milliseconds to close the message automatically. * Default value is 3000. */ life?: number | undefined; /** * Key of the Toast to display the message. */ group?: string | undefined; /** * Style class of the message. */ styleClass?: any; /** * Style class of the content. */ contentStyleClass?: any; } export interface ToastBreakpointsType { /** * Breakpoint for responsive mode. * * Example: * * * */ [key: string]: any; } /** * Defines valid properties in Toast component. */ export interface ToastProps { /** * Unique identifier of a message group. */ group?: string | undefined; /** * Position of the toast in viewport. * @defaultValue top-right */ position?: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'center' | undefined; /** * Whether to automatically manage layering. * @defaultValue true */ autoZIndex?: boolean | undefined; /** * Base zIndex value to use in layering. * @defaultValue 0 */ baseZIndex?: number | undefined; /** * Object literal to define styles per screen size. * @see ToastBreakpointsType */ breakpoints?: ToastBreakpointsType; /** * Icon to display in the toast close button. * @defaultValue pi pi-times */ closeIcon?: string | undefined; /** * Icon to display in the toast with info severity. * @defaultValue pi pi-info-circle */ infoIcon?: string | undefined; /** * Icon to display in the toast with warn severity. * @defaultValue pi pi-exclamation-triangle */ warnIcon?: string | undefined; /** * Icon to display in the toast with error severity. * @defaultValue pi pi-times */ errorIcon?: string | undefined; /** * Icon to display in the toast with success severity. * @defaultValue pi pi-check */ successIcon?: string | undefined; /** * Uses to pass all properties of the HTMLButtonElement to the close button. */ closeButtonProps?: ButtonHTMLAttributes | undefined; } export interface ToastSlots { /** * Custom message template. * @param {Object} scope - message slot's params. */ message(scope: { /** * Message of the component */ message: any; }): VNode[]; } export interface ToastEmits {} /** * **PrimeVue - Toast** * * _Toast is used to display messages in an overlay._ * * [Live Demo](https://www.primevue.org/toast/) * --- --- * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg) * * @group Component * */ declare class Toast extends ClassComponent {} declare module '@vue/runtime-core' { interface GlobalComponents { Toast: GlobalComponentConstructor; } } export default Toast;