UNPKG

1.92 kBTypeScriptView Raw
1import PropTypes from 'prop-types';
2import { TextProps, StyleProp, ViewStyle, TextStyle } from 'react-native';
3import { LeftRightStyle, IMessage } from './Models';
4export interface MessageTextProps<TMessage extends IMessage> {
5 position?: 'left' | 'right';
6 optionTitles?: string[];
7 currentMessage?: TMessage;
8 containerStyle?: LeftRightStyle<ViewStyle>;
9 textStyle?: LeftRightStyle<TextStyle>;
10 linkStyle?: LeftRightStyle<TextStyle>;
11 textProps?: TextProps;
12 customTextStyle?: StyleProp<TextStyle>;
13 parsePatterns?(linkStyle: TextStyle): any;
14}
15export declare function MessageText<TMessage extends IMessage = IMessage>({ currentMessage, optionTitles, position, containerStyle, textStyle, linkStyle: linkStyleProp, customTextStyle, parsePatterns, textProps, }: MessageTextProps<TMessage>): JSX.Element;
16export declare namespace MessageText {
17 var propTypes: {
18 position: PropTypes.Requireable<string>;
19 optionTitles: PropTypes.Requireable<(string | null | undefined)[]>;
20 currentMessage: PropTypes.Requireable<object>;
21 containerStyle: PropTypes.Requireable<PropTypes.InferProps<{
22 left: PropTypes.Requireable<number | boolean | object>;
23 right: PropTypes.Requireable<number | boolean | object>;
24 }>>;
25 textStyle: PropTypes.Requireable<PropTypes.InferProps<{
26 left: PropTypes.Requireable<number | boolean | object>;
27 right: PropTypes.Requireable<number | boolean | object>;
28 }>>;
29 linkStyle: PropTypes.Requireable<PropTypes.InferProps<{
30 left: PropTypes.Requireable<number | boolean | object>;
31 right: PropTypes.Requireable<number | boolean | object>;
32 }>>;
33 parsePatterns: PropTypes.Requireable<(...args: any[]) => any>;
34 textProps: PropTypes.Requireable<object>;
35 customTextStyle: PropTypes.Requireable<number | boolean | object>;
36 };
37}