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

21 lines
471 B

import { Image as ASTImage } from '@rocket.chat/message-parser';
import React, { FC } from 'react';
type ImageProps = {
value: ASTImage['value'];
};
const style = {
maxWidth: '100%',
};
const Image: FC<ImageProps> = ({ value }) => {
const { src, label } = value;
return (
<a href={src.value} target='_blank' rel='noopener noreferrer'>
<img src={src.value} data-title={src.value} alt={String(label.value)} style={style} />
</a>
);
};
export default Image;