refactor: Simplify DragableList styling and remove unnecessary margins

This commit is contained in:
kangfenmao 2025-02-19 09:20:57 +08:00
parent 2c3f89dbde
commit c494288f7b
2 changed files with 3 additions and 3 deletions

View File

@ -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>

View File

@ -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')}