feat: remove width prop from WorkflowNodeCard and adjust styling for consistent layout

This commit is contained in:
mlogclub
2026-06-28 16:40:51 +08:00
parent 530cf145b2
commit 655328d92a
2 changed files with 1 additions and 4 deletions
@@ -77,7 +77,6 @@ function FlowgramNodeForm({
title={field.value || fallbackTitle}
icon={icon}
selected={selected}
width={nodeType === "condition" ? "wide" : "normal"}
>
{nodeType === "condition" ? (
<Field<Record<string, unknown>> name="config">
@@ -7,20 +7,18 @@ export function WorkflowNodeCard({
title,
icon,
selected,
width = "normal",
children,
}: {
title: string
icon: string
selected: boolean
width?: "normal" | "wide"
children?: ReactNode
}) {
return (
<div
className={cn(
"group relative rounded-lg border bg-background p-0.5 transition-all",
width === "wide" ? "w-[320px]" : "w-[280px]",
"w-[242px]",
selected
? "border-[var(--g-selection-background)] shadow-[0_8px_24px_rgba(20,24,38,0.14)]"
: "border-border/80 shadow-sm hover:border-border hover:shadow-md"