This repository was archived by the owner on Aug 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathComposer.d.ts
57 lines (57 loc) · 2 KB
/
Composer.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
import PropTypes from 'prop-types';
import React from 'react';
import { TextInputProps } from 'react-native';
export interface ComposerProps {
composerHeight?: number;
text?: string;
placeholder?: string;
placeholderTextColor?: string;
textInputProps?: Partial<TextInputProps>;
textInputStyle?: TextInputProps['style'];
textInputAutoFocus?: boolean;
keyboardAppearance?: TextInputProps['keyboardAppearance'];
multiline?: boolean;
disableComposer?: boolean;
onTextChanged?(text: string): void;
onInputSizeChanged?(contentSize: {
width: number;
height: number;
}): void;
}
export default class Composer extends React.Component<ComposerProps> {
static defaultProps: {
composerHeight: number;
text: string;
placeholderTextColor: string;
placeholder: string;
textInputProps: null;
multiline: boolean;
disableComposer: boolean;
textInputStyle: {};
textInputAutoFocus: boolean;
keyboardAppearance: string;
onTextChanged: () => void;
onInputSizeChanged: () => void;
};
static propTypes: {
composerHeight: PropTypes.Requireable<number>;
text: PropTypes.Requireable<string>;
placeholder: PropTypes.Requireable<string>;
placeholderTextColor: PropTypes.Requireable<string>;
textInputProps: PropTypes.Requireable<object>;
onTextChanged: PropTypes.Requireable<(...args: any[]) => any>;
onInputSizeChanged: PropTypes.Requireable<(...args: any[]) => any>;
multiline: PropTypes.Requireable<boolean>;
disableComposer: PropTypes.Requireable<boolean>;
textInputStyle: PropTypes.Requireable<any>;
textInputAutoFocus: PropTypes.Requireable<boolean>;
keyboardAppearance: PropTypes.Requireable<string>;
};
contentSize?: {
width: number;
height: number;
};
onContentSizeChange: (e: any) => void;
onChangeText: (text: string) => void;
render(): JSX.Element;
}