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

18 lines
370 B
TypeScript
Raw Normal View History

2021-10-28 17:48:53 +00:00
import React from 'react';
import { Text } from 'react-native';
import { CodeLine as CodeLineProps } from '@rocket.chat/message-parser';
interface ICodeLineProps {
value: CodeLineProps['value'];
}
2022-03-29 18:53:10 +00:00
const CodeLine = ({ value }: ICodeLineProps) => {
2021-10-28 17:48:53 +00:00
if (value.type !== 'PLAIN_TEXT') {
return null;
}
return <Text>{value.value}</Text>;
};
export default CodeLine;