35 lines
1.3 KiB
TypeScript
35 lines
1.3 KiB
TypeScript
import type * as mui_material from "@mui/material";
|
|
import { type tipoResposta } from "p-respostas";
|
|
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;
|
|
};
|