UNPKG

@sixbell-telco/sdk

Version:

A collection of reusable components designed for use in Sixbell Telco Angular projects

40 lines (39 loc) 2.46 kB
import { Type } from '@angular/core'; import { toast as ngxToast } from 'ngx-sonner'; /** * @internal * Generates base toast classes with style variants for semantic colors */ export declare const toastVariants: (props?: ({ variant?: "default" | "success" | "error" | "warning" | "info" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; /** Possible toast style variants */ export type ToastVariantProps = 'default' | 'success' | 'error' | 'warning' | 'info' | null | undefined; /** * Toast function with semantic variants and Tailwind styling * Proxies ngx-sonner toast functionality with SDK styling */ declare function createToast(message: string, options?: Record<string, unknown>): string | number; declare namespace createToast { var success: (message: string, options?: Record<string, unknown>) => string | number; var error: (message: string, options?: Record<string, unknown>) => string | number; var warning: (message: string, options?: Record<string, unknown>) => string | number; var info: (message: string, options?: Record<string, unknown>) => string | number; var loading: (message: string, options?: Record<string, unknown>) => string | number; var promise: (promise: Promise<unknown>, options: Record<string, unknown>) => string | number | undefined; var custom: (component: Type<unknown>, options?: Record<string, unknown>) => string | number; var dismiss: (id?: string | number) => string | number | undefined; var dismissAll: () => string | number | undefined; } export declare const toast: typeof createToast & { success: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>; error: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>; warning: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>; info: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>; loading: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>; promise: (promise: Promise<unknown>, options: Record<string, unknown>) => ReturnType<typeof ngxToast>; custom: (component: Type<unknown>, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>; dismiss: (id?: string | number) => ReturnType<typeof ngxToast>; dismissAll: () => ReturnType<typeof ngxToast>; }; export {};