UNPKG

2.24 kBTypeScriptView Raw
1import PropTypes from 'prop-types';
2import React from 'react';
3import { EmitterSubscription, StyleProp, ViewStyle } from 'react-native';
4import Composer from './Composer';
5import Send from './Send';
6import Actions from './Actions';
7export interface InputToolbarProps {
8 options?: {
9 [key: string]: any;
10 };
11 optionTintColor?: string;
12 containerStyle?: StyleProp<ViewStyle>;
13 primaryStyle?: StyleProp<ViewStyle>;
14 accessoryStyle?: StyleProp<ViewStyle>;
15 renderAccessory?(props: InputToolbarProps): React.ReactNode;
16 renderActions?(props: Actions['props']): React.ReactNode;
17 renderSend?(props: Send['props']): React.ReactNode;
18 renderComposer?(props: Composer['props']): React.ReactNode;
19 onPressActionButton?(): void;
20}
21export default class InputToolbar extends React.Component<InputToolbarProps, {
22 position: string;
23}> {
24 static defaultProps: {
25 renderAccessory: null;
26 renderActions: null;
27 renderSend: null;
28 renderComposer: null;
29 containerStyle: {};
30 primaryStyle: {};
31 accessoryStyle: {};
32 onPressActionButton: () => void;
33 };
34 static propTypes: {
35 renderAccessory: PropTypes.Requireable<(...args: any[]) => any>;
36 renderActions: PropTypes.Requireable<(...args: any[]) => any>;
37 renderSend: PropTypes.Requireable<(...args: any[]) => any>;
38 renderComposer: PropTypes.Requireable<(...args: any[]) => any>;
39 onPressActionButton: PropTypes.Requireable<(...args: any[]) => any>;
40 containerStyle: PropTypes.Requireable<number | boolean | object>;
41 primaryStyle: PropTypes.Requireable<number | boolean | object>;
42 accessoryStyle: PropTypes.Requireable<number | boolean | object>;
43 };
44 state: {
45 position: string;
46 };
47 keyboardWillShowListener?: EmitterSubscription;
48 keyboardWillHideListener?: EmitterSubscription;
49 componentDidMount(): void;
50 componentWillUnmount(): void;
51 keyboardWillShow: () => void;
52 keyboardWillHide: () => void;
53 renderActions(): {} | null | undefined;
54 renderSend(): {} | null | undefined;
55 renderComposer(): {} | null | undefined;
56 renderAccessory(): JSX.Element | null;
57 render(): JSX.Element;
58}