@senka-ai/ui
Version:
A modern, type-safe Svelte 5 UI component library with full theme support, accessibility standards, and robust state management patterns
31 lines • 1.35 kB
TypeScript
import type { BaseProps, VariantComponent } from '../../type/component';
/**
* Toast component props interface
* A notification component that displays brief feedback or notifications about operations
*/
interface Props extends BaseProps, VariantComponent<'info' | 'success' | 'warning' | 'error'> {
/** Main title text displayed prominently */
title?: string;
/** Supporting description text (optional) */
description?: string;
/** Whether to show the title @default true */
showTitle?: boolean;
/** Whether to show the description @default true */
showDescription?: boolean;
/** Whether to show the close button @default true */
showCloseButton?: boolean;
/** Whether to show a border around the toast @default false */
showBorder?: boolean;
/** Called when the close button is clicked */
onClose?: () => void;
/** Whether the toast is dismissible @default true */
dismissible?: boolean;
/** Auto-dismiss duration in milliseconds (0 = no auto-dismiss) @default 0 */
duration?: number;
/** Called when the toast is dismissed (either by close button or auto-dismiss) */
onDismiss?: () => void;
}
declare const Toast: import("svelte").Component<Props, {}, "">;
type Toast = ReturnType<typeof Toast>;
export default Toast;
//# sourceMappingURL=Toast.svelte.d.ts.map