1.3.4 • Published 6 months ago
@types/muibox v1.3.4
Installation
npm install --save @types/muibox
Summary
This package contains type definitions for muibox (https://github.com/chunkai1312/muibox).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/muibox.
index.d.ts
// Type definitions for muibox 1.3
// Project: https://github.com/chunkai1312/muibox
// Definitions by: Diego Mijelshon <https://github.com/diegose>, David DIVERRES <https://github.com/comxd>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { ReactNode } from "react";
export function DialogProvider(_: any): any;
export function useDialog(): Dialog;
export function withDialog(): (WrappedComponent: any) => (props: any) => any;
export interface Dialog {
alert(options: AlertOptions | string): Promise<void>;
confirm(options: ConfirmOptions | string): Promise<void>;
prompt(options: PromptOptions | string): Promise<string>;
}
export interface DialogButtonOptions {
text?: string | undefined;
color?: string | undefined;
variant?: string | undefined;
startIcon?: ReactNode | undefined;
endIcon?: ReactNode | undefined;
}
export interface AlertOptions {
title?: string | undefined;
message?: string | ReactNode | undefined;
ok?: DialogButtonOptions | undefined;
}
export interface ConfirmOptions extends AlertOptions {
cancel?: DialogButtonOptions | undefined;
}
export interface PromptOptions extends ConfirmOptions {
required?: boolean | undefined;
defaultValue?: string | number | undefined;
placeholder?: string | undefined;
}
Additional Details
- Last updated: Thu, 08 Jul 2021 18:51:03 GMT
- Dependencies: @types/react
- Global values: none
Credits
These definitions were written by Diego Mijelshon, and David DIVERRES.