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:
parent
3e1583f0af
commit
72ef4be7a6
6 changed files with 136 additions and 22 deletions
|
@ -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) => (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue