verdnatura-chat/app/containers/markdown/new/Paragraph.tsx

24 lines
594 B
TypeScript
Raw Normal View History

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