feat: add icon property to workflow node specifications and update related components

This commit is contained in:
mlogclub
2026-06-28 15:24:00 +08:00
parent 389291143a
commit 530cf145b2
12 changed files with 42 additions and 57 deletions
@@ -4,14 +4,14 @@ import { cn } from "@/lib/utils"
import { WorkflowNodeIcon } from "./workflow-node-icon"
export function WorkflowNodeCard({
nodeType,
title,
icon,
selected,
width = "normal",
children,
}: {
nodeType: string
title: string
icon: string
selected: boolean
width?: "normal" | "wide"
children?: ReactNode
@@ -28,7 +28,7 @@ export function WorkflowNodeCard({
>
<div className="overflow-hidden rounded-lg border border-transparent bg-background">
<div className="flex items-center gap-2 px-3 pb-2 pt-3">
<WorkflowNodeIcon type={nodeType} />
<WorkflowNodeIcon icon={icon} />
<div className="min-w-0 flex-1">
<div className="truncate text-sm font-semibold leading-5 text-foreground">
{title}