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

displaying text

This commit is contained in:
Fedor Katurov 2019-10-17 14:44:13 +07:00
parent 57f90ee46b
commit 54ce8db210
8 changed files with 51 additions and 22 deletions

View file

@ -0,0 +1,20 @@
import React, { FC } from 'react';
import { INode } from '~/redux/types';
import path from 'ramda/es/path';
import { formatCommentText } from '~/utils/dom';
import * as styles from './styles.scss';
interface IProps {
node: INode;
}
const NodeTextBlock: FC<IProps> = ({ node }) => (
<div
className={styles.text}
dangerouslySetInnerHTML={{
__html: formatCommentText(null, path(['blocks', 0, 'text'], node)),
}}
/>
);
export { NodeTextBlock };