2021-10-28 17:49:08 +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';
|
|
|
|
import { themes } from '../../../constants/colors';
|
|
|
|
|
|
|
|
interface IParagraphProps {
|
|
|
|
value: ParagraphProps['value'];
|
|
|
|
}
|
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
const Paragraph = ({ value }: IParagraphProps) => {
|
2021-10-28 17:49:08 +00:00
|
|
|
const { theme } = useTheme();
|
|
|
|
return (
|
2022-03-29 18:53:27 +00:00
|
|
|
<Text style={[styles.text, { color: themes[theme].bodyText }]}>
|
2021-10-28 17:49:08 +00:00
|
|
|
<Inline value={value} />
|
|
|
|
</Text>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Paragraph;
|