@coreui/react
Version:
UI Components Library for React.js
48 lines (47 loc) • 1.31 kB
TypeScript
import React, { HTMLAttributes } from 'react';
import type { Colors } from '../../types';
export interface CToastProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
/**
* Apply a CSS fade transition to the toast.
*/
animation?: boolean;
/**
* Auto hide the toast.
*/
autohide?: boolean;
/**
* A string of all className you want applied to the base component.
*/
className?: string;
/**
* Sets the color context of the component to one of CoreUI’s themed colors.
*
* @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string
*/
color?: Colors;
/**
* Delay hiding the toast (ms).
*/
delay?: number;
/**
* @ignore
*/
index?: number;
/**
* @ignore
*/
innerKey?: number | string;
/**
* Callback fired when the component requests to be closed.
*/
onClose?: (index: number | null) => void;
/**
* Callback fired when the component requests to be shown.
*/
onShow?: (index: number | null) => void;
/**
* Toggle the visibility of component.
*/
visible?: boolean;
}
export declare const CToast: React.ForwardRefExoticComponent<CToastProps & React.RefAttributes<HTMLDivElement>>;