refactor: Simplify DragableList styling and remove unnecessary margins
This commit is contained in:
parent
2c3f89dbde
commit
c494288f7b
@ -51,7 +51,7 @@ const DragableList: FC<Props<any>> = ({
|
||||
const id = item.id || item
|
||||
return (
|
||||
<Draggable key={`draggable_${id}_${index}`} draggableId={id} index={index}>
|
||||
{(provided, snapshot) => (
|
||||
{(provided) => (
|
||||
<div
|
||||
ref={provided.innerRef}
|
||||
{...provided.draggableProps}
|
||||
@ -59,7 +59,7 @@ const DragableList: FC<Props<any>> = ({
|
||||
style={{
|
||||
...listStyle,
|
||||
...provided.draggableProps.style,
|
||||
marginBottom: index === list.length - 1 && !snapshot.isDragging ? 0 : 8
|
||||
marginBottom: 8
|
||||
}}>
|
||||
{children(item, index)}
|
||||
</div>
|
||||
|
||||
@ -153,7 +153,7 @@ const Assistants: FC<Props> = ({
|
||||
}}
|
||||
</DragableList>
|
||||
{!dragging && (
|
||||
<AssistantItem onClick={onCreateAssistant} style={{ marginTop: 5 }}>
|
||||
<AssistantItem onClick={onCreateAssistant}>
|
||||
<AssistantName>
|
||||
<PlusOutlined style={{ color: 'var(--color-text-2)', marginRight: 4 }} />
|
||||
{t('chat.add.assistant.title')}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user