fix: margins on list component

This commit is contained in:
Razboy20
2024-02-17 12:59:43 -06:00
committed by doprz
parent 74be880f9d
commit cc7138949c

View File

@@ -135,8 +135,7 @@ const List: React.FC<ListProps> = ({ draggableElements, itemHeight, listHeight,
<div <div
{...provided.droppableProps} {...provided.droppableProps}
ref={provided.innerRef} ref={provided.innerRef}
style={{ width: `${listWidth}px` }} style={{ width: `${listWidth}px`, marginBottom: `-${gap}px` }}
className=''
> >
{items.map((item, index) => ( {items.map((item, index) => (
<Draggable key={item.id} draggableId={item.id} index={index}> <Draggable key={item.id} draggableId={item.id} index={index}>
@@ -150,7 +149,9 @@ const List: React.FC<ListProps> = ({ draggableElements, itemHeight, listHeight,
marginBottom: `${gap}px`, marginBottom: `${gap}px`,
}} }}
> >
{React.cloneElement(item.content, { dragHandleProps: draggableProvided.dragHandleProps })} {React.cloneElement(item.content, {
dragHandleProps: draggableProvided.dragHandleProps,
})}
</div> </div>
)} )}
</Draggable> </Draggable>