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