@mateosuarezdev/react-ui 1.0.51 → 1.0.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -825,6 +825,38 @@ declare const titleSizes: {
825
825
  "6": string;
826
826
  };
827
827
 
828
+ declare type Toast = {
829
+ id: string;
830
+ type: "simple" | "info" | "success" | "warning" | "error" | "loading";
831
+ message: string;
832
+ duration?: number;
833
+ timeout?: number;
834
+ };
835
+
836
+ export declare const toast: {
837
+ simple: (message: string, data?: Partial<Toast>) => void;
838
+ info: (message: string, data?: Partial<Toast>) => void;
839
+ success: (message: string, data?: Partial<Toast>) => void;
840
+ warning: (message: string, data?: Partial<Toast>) => void;
841
+ error: (message: string, data?: Partial<Toast>) => void;
842
+ loading: (message: string, data?: Partial<Toast>) => string;
843
+ update: (id: string, newToast: Omit<Partial<Toast>, "id">) => void;
844
+ dismiss: (id: string) => void;
845
+ };
846
+
847
+ declare type ToastColors = {
848
+ success?: string;
849
+ simple?: string;
850
+ info?: string;
851
+ warning?: string;
852
+ error?: string;
853
+ loading?: string;
854
+ };
855
+
856
+ export declare const Toaster: ({ colors }: {
857
+ colors?: ToastColors;
858
+ }) => JSX.Element;
859
+
828
860
  export declare function toTitleCase(str: string): string;
829
861
 
830
862
  export declare function useClickAway<T extends HTMLElement = HTMLElement>(callback: () => void): RefObject<T | null>;