UNPKG

2.21 kBTypeScriptView Raw
1import React from 'react';
2import Inner from './inner';
3import type { DialogProps, InnerProps, ShowConfig, ShowConfigV1, ShowConfigV2 } from './types';
4export type { DialogProps, ShowConfig, InnerProps, ShowConfigV1, ShowConfigV2 };
5declare class Dialog extends React.Component<DialogProps> {
6 static Inner: typeof Inner;
7 static withContext: <P extends import("./show").WithContextDialogProps, C>(WrappedComponent: React.JSXElementConstructor<P> & C) => (props: JSX.LibraryManagedAttributes<C, Omit<P, "contextDialog">>) => React.JSX.Element;
8 static show: (config: ShowConfig) => {
9 hide: () => void;
10 };
11 static alert: (config: ShowConfig) => {
12 hide: () => void;
13 };
14 static confirm: (config: ShowConfig) => {
15 hide: () => void;
16 };
17 static success: (config: ShowConfig) => {
18 hide: () => void;
19 };
20 static error: (config: ShowConfig) => {
21 hide: () => void;
22 };
23 static notice: (config: ShowConfig) => {
24 hide: () => void;
25 };
26 static warning: (config: ShowConfig) => {
27 hide: () => void;
28 };
29 static help: (config: ShowConfig) => {
30 hide: () => void;
31 };
32 render(): React.JSX.Element;
33}
34declare const _default: import("../config-provider/types").ConfiguredComponentClass<DialogProps & import("../config-provider/types").ComponentCommonProps, Dialog, {}> & {
35 help: (config: ShowConfig) => {
36 hide: () => void;
37 };
38 show: (config: ShowConfig) => {
39 hide: () => void;
40 };
41 warning: (config: ShowConfig) => {
42 hide: () => void;
43 };
44 error: (config: ShowConfig) => {
45 hide: () => void;
46 };
47 alert: (config: ShowConfig) => {
48 hide: () => void;
49 };
50 confirm: (config: ShowConfig) => {
51 hide: () => void;
52 };
53 success: (config: ShowConfig) => {
54 hide: () => void;
55 };
56 notice: (config: ShowConfig) => {
57 hide: () => void;
58 };
59 Inner: typeof Inner;
60 withContext: <P extends import("./show").WithContextDialogProps, C>(WrappedComponent: React.JSXElementConstructor<P> & C) => (props: JSX.LibraryManagedAttributes<C, Omit<P, "contextDialog">>) => React.JSX.Element;
61};
62export default _default;