UNPKG

1.46 kBTypeScriptView Raw
1import 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>): React.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<NonNullable<number | boolean | object | null | undefined>>;
23 textStyle: PropTypes.Requireable<NonNullable<number | boolean | object | null | undefined>>;
24 children: PropTypes.Requireable<PropTypes.ReactElementLike>;
25 alwaysShowSend: PropTypes.Requireable<boolean>;
26 disabled: PropTypes.Requireable<boolean>;
27 sendButtonProps: PropTypes.Requireable<object>;
28 };
29};