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

sorting image attaches on comment form

This commit is contained in:
Fedor Katurov 2019-11-01 15:42:34 +07:00
parent 3e1583f0af
commit 72ef4be7a6
6 changed files with 136 additions and 22 deletions

View file

@ -12,12 +12,17 @@ const SortableImageGrid = SortableContainer(
items,
locked,
onDrop,
size = 200,
}: {
items: IFile[];
locked: IUploadStatus[];
onDrop: (file_id: IFile['id']) => void;
size?: number;
}) => (
<div className={styles.grid}>
<div
className={styles.grid}
style={{ gridTemplateColumns: `repeat(auto-fill, minmax(${size}px, 1fr))` }}
>
{items
.filter(file => file && file.id)
.map((file, index) => (