Skip to content

Commit f9ecef0

Browse files
committed
optimize EditorOperatorItem Card style
1 parent fa391e3 commit f9ecef0

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

src/components/editor/operator/EditorOperatorItem.tsx

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,29 @@ export const EditorOperatorItem = ({
3434
}技能:${skillUsage}`
3535

3636
return (
37-
<div className="h-[72px] w-[calc(5*72px)]">
38-
<Card
39-
elevation={Elevation.TWO}
40-
className={clsx(
41-
'flex items-start',
42-
editing && 'bg-gray-100',
43-
isDragging && 'opacity-30',
44-
)}
45-
>
46-
<Icon
47-
className="cursor-grab active:cursor-grabbing p-1 -mt-1 -ml-2 mr-3 rounded-[1px]"
48-
icon="drag-handle-vertical"
49-
{...attributes}
50-
{...listeners}
51-
/>
52-
<OperatorAvatar id={id} size="large" />
53-
<div className="ml-4 flex-grow">
54-
<h3 className="font-bold leading-none mb-1">{operator.name}</h3>
55-
<div className="text-gray-400">{skill}</div>
56-
</div>
57-
58-
<CardEditOption active={editing} onClick={onEdit} />
59-
<CardDeleteOption className="-mr-3" onClick={onRemove} />
60-
</Card>
61-
</div>
37+
<Card
38+
elevation={Elevation.TWO}
39+
className={clsx(
40+
'flex items-start',
41+
editing && 'bg-gray-100',
42+
isDragging && 'opacity-30',
43+
'h-[72px] w-[calc(4.5*72px)]',
44+
)}
45+
>
46+
<Icon
47+
className="cursor-grab active:cursor-grabbing p-1 -mt-1 -ml-2 mr-3 rounded-[1px]"
48+
icon="drag-handle-vertical"
49+
{...attributes}
50+
{...listeners}
51+
/>
52+
<OperatorAvatar id={id} size="large" />
53+
<div className="ml-4 flex-grow">
54+
<h3 className="font-bold leading-none mb-1">{operator.name}</h3>
55+
<div className="text-gray-400 text-xs">{skill}</div>
56+
</div>
57+
58+
<CardEditOption active={editing} onClick={onEdit} />
59+
<CardDeleteOption className="-mr-3" onClick={onRemove} />
60+
</Card>
6261
)
6362
}

0 commit comments

Comments
 (0)