@scania/tegel
Version:
Tegel Design System
41 lines (40 loc) • 1.39 kB
TypeScript
import { EventEmitter } from '../../stencil-public-runtime';
/**
* @slot header - Slot for the Toast header.
* @slot subheader - Slot for the Toast subheader.
* @slot actions - Slot for the Toast bottom section, used for links.
*/
export declare class TdsToast {
host: HTMLElement;
/** ID for the Toast. Randomly generated if not specified. */
toastId: string;
/** Header text for the component. */
header?: string;
/** Subheader text for the component. */
subheader?: string;
/** Type of Toast. */
variant: 'information' | 'error' | 'warning' | 'success';
/** Hides the Toast. */
hidden: boolean;
/** Enables the close button. */
closable: boolean;
/** ARIA role for the Toast. */
toastRole: 'alert' | 'log' | 'status';
/** Provides an accessible name for the components close button */
tdsCloseAriaLabel?: string;
/** ARIA live for the Toast. */
tdsAriaLive: 'polite' | 'assertive';
/** Hides the Toast. */
hideToast(): Promise<void>;
/** Shows the Toast. */
showToast(): Promise<void>;
/** Sends unique Toast identifier when component is closed. */
tdsClose: EventEmitter<{
toastId: string;
}>;
getIconName: () => "info" | "error" | "tick" | "warning";
handleClose: () => void;
handleShow: () => void;
connectedCallback(): void;
render(): any;
}