1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

splitting comment text by blocks

This commit is contained in:
Fedor Katurov 2019-11-26 10:25:43 +07:00
parent d74c9ee739
commit 93afa626db
8 changed files with 206 additions and 158 deletions

View file

@ -0,0 +1,20 @@
import React, { FC } from 'react';
import { ICommentBlock } from '~/constants/comment';
import styles from './styles.scss';
interface IProps {
block: ICommentBlock;
}
const CommentTextBlock: FC<IProps> = ({ block }) => {
return (
<div
className={styles.text}
dangerouslySetInnerHTML={{
__html: `<p>${block.content}</p>`,
}}
/>
);
};
export { CommentTextBlock };

View file

@ -0,0 +1,14 @@
.text {
padding: $gap;
font-weight: 300;
font: $font_16_medium;
line-height: 20px;
box-sizing: border-box;
position: relative;
color: #cccccc;
word-break: break-word;
b {
font-weight: 600;
}
}