@ryanhelsing/ry-ui
Version:
Framework-agnostic, Light DOM web components. CSS is the source of truth.
31 lines • 1.03 kB
TypeScript
/**
* <ry-toast>
*
* Toast notification component with static API.
*
* Usage (declarative):
* <ry-toast variant="success">Saved successfully!</ry-toast>
*
* Usage (programmatic):
* RyToast.success('Saved!');
* RyToast.error('Failed to save');
* RyToast.info('Processing...');
* RyToast.warning('Are you sure?');
*
* JS and structure CSS use data-ry-target, theme CSS uses classes.
*/
import { RyElement } from '../core/ry-element.js';
import type { ToastOptions } from '../types.js';
export declare class RyToast extends RyElement {
#private;
static observedAttributes: readonly ["variant", "duration"];
static show(options: ToastOptions): RyToast;
static success(message: string, duration?: number): RyToast;
static error(message: string, duration?: number): RyToast;
static info(message: string, duration?: number): RyToast;
static warning(message: string, duration?: number): RyToast;
setup(): void;
dismiss(): void;
teardown(): void;
}
//# sourceMappingURL=ry-toast.d.ts.map