fix: margins on list component
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user