mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
better text formatting
This commit is contained in:
parent
de8e5b2d9e
commit
6d0a22707c
3 changed files with 19 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
|||
import React, { FC } from 'react';
|
||||
import { INode } from '~/redux/types';
|
||||
import path from 'ramda/es/path';
|
||||
import { formatCommentText } from '~/utils/dom';
|
||||
import { formatText } from '~/utils/dom';
|
||||
import * as styles from './styles.scss';
|
||||
|
||||
interface IProps {
|
||||
|
@ -12,7 +12,7 @@ const NodeTextBlock: FC<IProps> = ({ node }) => (
|
|||
<div
|
||||
className={styles.text}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: formatCommentText(null, path(['blocks', 0, 'text'], node)),
|
||||
__html: formatText(path(['blocks', 0, 'text'], node)),
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -7,5 +7,7 @@
|
|||
|
||||
p {
|
||||
margin: $gap 0;
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue