2021-10-20 16:32:58 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { Text } from 'react-native';
|
|
|
|
import { Paragraph as ParagraphProps } from '@rocket.chat/message-parser';
|
|
|
|
|
|
|
|
import Inline from './Inline';
|
|
|
|
import styles from '../styles';
|
|
|
|
import { useTheme } from '../../../theme';
|
2022-07-04 18:10:14 +00:00
|
|
|
import { themes } from '../../../lib/constants';
|
2021-10-20 16:32:58 +00:00
|
|
|
|
|
|
|
interface IParagraphProps {
|
|
|
|
value: ParagraphProps['value'];
|
|
|
|
}
|
|
|
|
|
2022-03-25 17:20:09 +00:00
|
|
|
const Paragraph = ({ value }: IParagraphProps) => {
|
2022-07-04 18:10:14 +00:00
|
|
|
const { theme } = useTheme();
|
2021-10-20 16:32:58 +00:00
|
|
|
return (
|
2022-07-04 18:10:14 +00:00
|
|
|
<Text style={[styles.text, { color: themes[theme].bodyText }]}>
|
2021-10-20 16:32:58 +00:00
|
|
|
<Inline value={value} />
|
|
|
|
</Text>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Paragraph;
|