@doku-dev/doku-fragment
Version:
A new Angular UI library that moving away from Bootstrap and built from scratch.
38 lines (37 loc) • 916 B
TypeScript
import { TemplateRef } from '@angular/core';
export interface DokuToastItemOptions {
/**
* State of the toast. Each one has a different color.
* @default 'neutral'
*/
state?: 'neutral' | 'success' | 'warning' | 'error';
/**
* Whether the toast is dismissible.
* @default false
*/
dismissible?: boolean;
/**
* Whether the toast is automatically dismissed.
* @default true
*/
autoDismiss?: boolean;
/**
* The duration of the toast before automatically dismissed.
* Do nothing if `autoDismiss` false.
*
* Value in milliseconds.
*
* @default 3000
*/
duration?: number;
}
export interface DokuToastItem extends DokuToastItemOptions {
/**
* Content of the toast as a string.
*/
text?: string;
/**
* Content of the toast a template ref.
*/
template?: TemplateRef<unknown>;
}