This commit is contained in:
Luiz Silva 2024-05-06 10:38:12 -03:00
parent d908bb44e0
commit 1470116cf5
26 changed files with 3497 additions and 1 deletions

35
dist/AlertasFront/index.d.ts vendored Normal file
View file

@ -0,0 +1,35 @@
import type * as mui_material from "@mui/material";
import { type tipoResposta } from "~comuns/dist";
import React from "react";
import type * as react_toastify from "react-toastify";
import type { Id } from "react-toastify";
export declare const componentesAlerta: ({ mui_material: { Avatar, Typography }, react_toastify: { ToastContainer, Slide, toast }, }: {
/**
** pnpm i react-toastify@^10.0.5
** import type react_toastify from "react-toastify";
*/
react_toastify: typeof react_toastify;
/**
** pnpm i @mui/material@^5.15.15
** import type mui_material from "@mui/material";
*/
mui_material: typeof mui_material;
}) => {
Alerta: () => {
id: Id | undefined;
aguarde(): any;
exibir(res: tipoResposta<any>): any;
/**
*
* @param p função que será executada
* @param transformar converte o valor de retorno da função em um tipoResposta para exibição
* @returns
*/
promisse<T>(p: () => Promise<T>, transformar?: (valor: T) => tipoResposta<string>): Promise<T>;
fechar(): void;
erro(mensagem: string): any;
erroCatch(erro: any): any;
sucesso(mensagem: string): any;
};
AlertaContainer: () => React.JSX.Element;
};