-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
40 lines (33 loc) · 1.14 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
declare module 'react-native-connected-inputs' {
import { TextInput, ReturnKeyTypeOptions } from 'react-native';
import { ReactElement, ReactNode } from 'react';
interface ConnectedInput {
ref: TextInput | null;
order: number;
}
export function useConnectedInputs(
onSubmit?: () => void
): (order: number) => {
ref: (input: TextInput | null) => void;
onSubmitEditing: () => void;
returnKeyType: ReturnKeyTypeOptions;
blurOnSubmit: boolean;
};
interface ConnectedInputsProps {
children: ReactElement<any>[];
onSubmit?: () => void;
}
export const ConnectedInputs: React.FC<ConnectedInputsProps>;
interface ConnectedInputsContextType {
registerInput: (order: number, input: TextInput | null) => void;
connectInput: (order: number) => {
ref: (input: TextInput | null) => void;
onSubmitEditing: () => void;
returnKeyType: ReturnKeyTypeOptions;
blurOnSubmit: boolean;
};
handleSubmit: (onSubmit: () => void) => void;
}
export const ConnectedInputsProvider: React.FC<{ children: ReactNode }>;
export function useConnectedInputsContext(): ConnectedInputsContextType;
}