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

Merge pull request #32 from muerwre/develop

Develop
This commit is contained in:
muerwre 2021-02-24 16:55:28 +07:00 committed by GitHub
commit 9d8346b315
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 249 additions and 73 deletions

View file

@ -4,6 +4,7 @@ import { formatCellText, getURL } from '~/utils/dom';
import classNames from 'classnames';
import styles from './styles.module.scss';
import markdown from '~/styles/common/markdown.module.scss';
import { Icon } from '~/components/input/Icon';
import { flowSetCellView } from '~/redux/flow/actions';
import { PRESETS } from '~/constants/urls';
@ -118,6 +119,8 @@ const Cell: FC<IProps> = ({
}
}, [title]);
const cellText = useMemo(() => formatCellText(text), [text]);
return (
<div className={classNames(styles.cell, styles[(flow && flow.display) || 'single'])} ref={ref}>
{is_visible && (
@ -149,7 +152,10 @@ const Cell: FC<IProps> = ({
<div className={styles.text}>
{title && <div className={styles.text_title}>{title}</div>}
<Group dangerouslySetInnerHTML={{ __html: formatCellText(text) }} />
<div
dangerouslySetInnerHTML={{ __html: cellText }}
className={markdown.wrapper}
/>
</div>
)}
@ -157,7 +163,10 @@ const Cell: FC<IProps> = ({
<div className={styles.text_only}>
{title && <div className={styles.text_title}>{title}</div>}
<Group dangerouslySetInnerHTML={{ __html: formatCellText(text) }} />
<div
dangerouslySetInnerHTML={{ __html: cellText }}
className={markdown.wrapper}
/>
</div>
)}
</div>

View file

@ -327,6 +327,7 @@
overflow: hidden;
box-sizing: border-box;
position: relative;
font-size: 6px;
&::after {
content: ' ';