1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00
vault-frontend/src/components/comment/CommentTextBlock/index.tsx
2021-02-24 15:54:14 +07:00

21 lines
589 B
TypeScript

import React, { FC } from 'react';
import { ICommentBlockProps } from '~/constants/comment';
import styles from './styles.module.scss';
import classNames from 'classnames';
import markdown from '~/styles/common/markdown.module.scss';
import { formatText } from '~/utils/dom';
interface IProps extends ICommentBlockProps {}
const CommentTextBlock: FC<IProps> = ({ block }) => {
return (
<div
className={classNames(styles.text, markdown.wrapper)}
dangerouslySetInnerHTML={{
__html: formatText(block.content),
}}
/>
);
};
export { CommentTextBlock };