import React from 'react'; import { Text } from 'react-native'; import { InlineCode as InlineCodeProps } from '@rocket.chat/message-parser'; import styles from '../styles'; import { themes } from '../../../constants/colors'; import { useTheme } from '../../../theme'; interface IInlineCodeProps { value: InlineCodeProps['value']; } const InlineCode = ({ value }: IInlineCodeProps) => { const { theme } = useTheme(); return ( {(block => { switch (block.type) { case 'PLAIN_TEXT': return {block.value}; default: return null; } })(value)} ); }; export default InlineCode;