UNPKG

1.39 kBTypeScriptView Raw
1import * as React from 'react';
2import PropTypes from 'prop-types';
3import { StyleProp, ViewStyle, TextStyle, TouchableOpacityProps } from 'react-native';
4import { IMessage } from './Models';
5export interface SendProps<TMessage extends IMessage> {
6 text?: string;
7 label?: string;
8 containerStyle?: StyleProp<ViewStyle>;
9 textStyle?: StyleProp<TextStyle>;
10 children?: React.ReactNode;
11 alwaysShowSend?: boolean;
12 disabled?: boolean;
13 sendButtonProps?: Partial<TouchableOpacityProps>;
14 onSend?(messages: Partial<TMessage> | Partial<TMessage>[], shouldResetInputToolbar: boolean): void;
15}
16export declare const Send: {
17 <TMessage extends IMessage = IMessage>({ text, containerStyle, children, textStyle, label, alwaysShowSend, disabled, sendButtonProps, onSend, }: SendProps<TMessage>): JSX.Element | null;
18 propTypes: {
19 text: PropTypes.Requireable<string>;
20 onSend: PropTypes.Requireable<(...args: any[]) => any>;
21 label: PropTypes.Requireable<string>;
22 containerStyle: PropTypes.Requireable<number | boolean | object>;
23 textStyle: PropTypes.Requireable<number | boolean | object>;
24 children: PropTypes.Requireable<PropTypes.ReactElementLike>;
25 alwaysShowSend: PropTypes.Requireable<boolean>;
26 disabled: PropTypes.Requireable<boolean>;
27 sendButtonProps: PropTypes.Requireable<object>;
28 };
29};