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/Bold.tsx

27 lines
672 B

import { Bold as ASTBold } from '@rocket.chat/message-parser';
import React, { FC } from 'react';
import Italic from './Italic';
import Link from './Link';
import Strike from './Strike';
const Bold: FC<{ value: ASTBold['value'] }> = ({ value = [] }) => (
<strong>
{value.map((block, index) => {
switch (block.type) {
case 'LINK':
return <Link key={index} value={block.value} />;
case 'PLAIN_TEXT':
return block.value;
case 'STRIKE':
return <Strike key={index} value={block.value} />;
case 'ITALIC':
return <Italic key={index} value={block.value} />;
default:
return null;
}
})}
</strong>
);
export default Bold;