The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/client/components/Message/MessageBodyRender/InlineCode.tsx

19 lines
499 B

import { InlineCode as ASTInlineCode } from '@rocket.chat/message-parser';
import React, { ReactElement, FC } from 'react';
import PlainText from './PlainText';
const InlineCode: FC<{ value: ASTInlineCode['value'] }> = ({ value }) => (
<code className='code-colors inline'>
{((block): ReactElement | null => {
switch (block.type) {
case 'PLAIN_TEXT':
return <PlainText value={block.value} />;
default:
return null;
}
})(value)}
</code>
);
export default InlineCode;