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/client/components/Message/Body/InlineCode.tsx

17 lines
419 B

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