mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
better image thumbs on comments
This commit is contained in:
parent
4ed2957cb4
commit
a6434399ba
4 changed files with 17 additions and 4 deletions
5
package-lock.json
generated
5
package-lock.json
generated
|
@ -8124,6 +8124,11 @@
|
||||||
"integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=",
|
"integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"flexbin": {
|
||||||
|
"version": "0.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/flexbin/-/flexbin-0.2.0.tgz",
|
||||||
|
"integrity": "sha1-ASYwbT1ZX8t9/LhxSbnJWZ/49Ok="
|
||||||
|
},
|
||||||
"flush-write-stream": {
|
"flush-write-stream": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz",
|
||||||
|
|
|
@ -77,6 +77,7 @@
|
||||||
"eslint-plugin-prettier": "^3.1.0",
|
"eslint-plugin-prettier": "^3.1.0",
|
||||||
"eslint-plugin-react": "^7.14.3",
|
"eslint-plugin-react": "^7.14.3",
|
||||||
"eslint-plugin-react-hooks": "^1.7.0",
|
"eslint-plugin-react-hooks": "^1.7.0",
|
||||||
|
"flexbin": "^0.2.0",
|
||||||
"history": "^4.7.2",
|
"history": "^4.7.2",
|
||||||
"http-errors": "~1.6.2",
|
"http-errors": "~1.6.2",
|
||||||
"less": "^3.8.1",
|
"less": "^3.8.1",
|
||||||
|
|
|
@ -27,7 +27,9 @@ const Comment: FC<IProps> = ({ comment, is_empty, is_loading, className, photo,
|
||||||
{comment.files && comment.files.length > 0 && (
|
{comment.files && comment.files.length > 0 && (
|
||||||
<div className={styles.images}>
|
<div className={styles.images}>
|
||||||
{comment.files.map(file => (
|
{comment.files.map(file => (
|
||||||
<ImageUpload thumb={getURL(file.url)} />
|
<div>
|
||||||
|
<img src={getURL(file.url)} />
|
||||||
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -7,9 +7,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@import 'flexbin/flexbin.scss';
|
||||||
|
|
||||||
.images {
|
.images {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
@include flexbin(150px, 10px);
|
||||||
column-gap: $grid_line;
|
|
||||||
|
img {
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue