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

better flow appearance

This commit is contained in:
Fedor Katurov 2019-10-23 16:43:18 +07:00
parent 3d2e2a6f99
commit 428930497e
2 changed files with 88 additions and 46 deletions

View file

@ -60,7 +60,9 @@ const Cell: FC<IProps> = ({
return (
<div
className={classNames(styles.cell, (flow && flow.display) || 'single', { is_text: false })}
className={classNames(styles.cell, styles[(flow && flow.display) || 'single'], {
[styles.is_text]: false,
})}
>
{can_edit && (
<div className={styles.menu}>
@ -79,9 +81,11 @@ const Cell: FC<IProps> = ({
</div>
)}
<div className={styles.face} onClick={onClick}>
{title && <div className={styles.title}>{title}</div>}
{text && <div className={styles.text}>{text}</div>}
<div className={classNames(styles.face, { [styles.has_text]: text })}>
<div className={styles.face_content}>
{title && <div className={styles.title}>{title}</div>}
{text && <div className={styles.text}>{text}</div>}
</div>
</div>
{thumbnail && (
@ -91,6 +95,7 @@ const Cell: FC<IProps> = ({
backgroundImage: `url("${getURL({ url: thumbnail })}")`,
opacity: is_loaded ? 1 : 0,
}}
onClick={onClick}
>
<img src={getURL({ url: thumbnail })} onLoad={onImageLoad} alt="" />
</div>