feat: improve UI components with consistent styling and layout adjustments

This commit is contained in:
mlogclub
2026-06-28 11:29:03 +08:00
parent 6a0e65bc07
commit 5160499fbf
7 changed files with 41 additions and 59 deletions
@@ -12,17 +12,17 @@ export function WorkflowNodePalette({
onAddNode: (spec: AIWorkflowNodeSpec) => void
}) {
return (
<aside className="relative z-50 flex w-60 shrink-0 flex-col border-r bg-muted/20">
<aside className="absolute left-3 top-3 z-50 flex max-h-[calc(100%-1.5rem)] w-64 shrink-0 flex-col overflow-hidden rounded-md border bg-background/95 shadow-sm backdrop-blur">
<div className="border-b px-3 py-2">
<div className="text-sm font-medium"></div>
<div className="text-xs font-medium text-muted-foreground"></div>
</div>
<div className="min-h-0 flex-1 overflow-y-auto p-2">
<div className="min-h-0 flex-1 overflow-y-auto p-1.5">
<div className="space-y-1">
{nodeSpecs.map((spec) => (
<button
key={spec.type}
type="button"
className="flex w-full items-start gap-2 rounded-md border bg-background px-2 py-2 text-left text-sm hover:bg-muted"
className="flex w-full items-start gap-2 rounded-sm px-2 py-2 text-left text-sm hover:bg-muted"
onClick={() => onAddNode(spec)}
>
<PlusIcon className="mt-0.5 size-3.5 shrink-0 text-muted-foreground" />