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

23 lines
550 B
TypeScript
Raw Normal View History

2021-10-28 17:48:53 +00:00
import React from 'react';
import { Text } from 'react-native';
import { Plain as PlainProps } from '@rocket.chat/message-parser';
import styles from '../styles';
import { useTheme } from '../../../theme';
import { themes } from '../../../constants/colors';
interface IPlainProps {
value: PlainProps['value'];
}
2022-03-29 18:53:10 +00:00
const Plain = ({ value }: IPlainProps) => {
2021-10-28 17:48:53 +00:00
const { theme } = useTheme();
return (
2022-03-29 18:53:10 +00:00
<Text accessibilityLabel={value} style={[styles.plainText, { color: themes[theme].bodyText }]}>
2021-10-28 17:48:53 +00:00
{value}
</Text>
);
};
export default Plain;