-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
71 lines (58 loc) · 2.25 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Type definitions for react-bootstrap-formutil@>0.0.3
// Project: react-bootstrap-formutil
// Definitions by: qiqiboy <https://github.com/qiqiboy>
import React from 'react';
import { ColProps } from 'react-bootstrap';
import { BaseEasyFieldComponentProps, $FieldHandler, OtherKeys } from 'react-formutil';
export * from 'react-formutil';
export type ErrorLevel = 0 | 1 | 2 | 'off';
export interface FormGroupComponentProps<T = any, P = {}, Fields = {}, WeakFields = Fields>
extends BaseEasyFieldComponentProps<T, P, Fields, WeakFields>,
ColProps {
wrapperCol?: ColProps;
labelCol?: ColProps;
label?: React.ReactNode;
floatingLabel?: boolean;
helper?: React.ReactNode;
extra?: React.ReactNode;
addons?: {
size?: 'sm' | 'lg';
pre?: React.ReactNode;
end?: React.ReactNode;
};
feedback?: boolean;
noStyle?: boolean;
errorLevel?: ErrorLevel;
children: React.ReactElement<any> | (($fieldHandler: Partial<$FieldHandler<T>> & OtherKeys) => React.ReactNode);
controlId?: string;
className?: string;
as?: React.ElementType;
}
export class FormGroup<T = any, P = {}, Fields = {}, WeakFields = Fields> extends React.Component<
FormGroupComponentProps<T, P, Fields, WeakFields> & OtherKeys
> {}
interface CheckboxGroupProps<T> {
onFocus?: React.FocusEventHandler;
onBlur?: React.FocusEventHandler;
value?: T[];
onChange?(value: T[]): void;
children: React.ReactElement<any> | Array<React.ReactElement<any>>;
}
export class CheckboxGroup<T = any> extends React.Component<CheckboxGroupProps<T>> {}
interface SwitchGroupProps<T> {
onFocus?: React.FocusEventHandler;
onBlur?: React.FocusEventHandler;
value?: T[];
onChange?(value: T[]): void;
children: React.ReactElement<any> | Array<React.ReactElement<any>>;
}
export class SwitchGroup<T = any> extends React.Component<SwitchGroupProps<T>> {}
interface RadioGroupProps<T> {
onFocus?: React.FocusEventHandler;
onBlur?: React.FocusEventHandler;
value?: T;
onChange?(value: T): void;
children: React.ReactElement<any> | Array<React.ReactElement<any>>;
}
export class RadioGroup<T = any> extends React.Component<RadioGroupProps<T>> {}
export function setErrorLevel(errorLevel: ErrorLevel): void;