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} title={field.value || fallbackTitle}
icon={icon} icon={icon}
selected={selected} selected={selected}
width={nodeType === "condition" ? "wide" : "normal"}
> >
{nodeType === "condition" ? ( {nodeType === "condition" ? (
<Field<Record<string, unknown>> name="config"> <Field<Record<string, unknown>> name="config">
@@ -7,20 +7,18 @@ export function WorkflowNodeCard({
title, title,
icon, icon,
selected, selected,
width = "normal",
children, children,
}: { }: {
title: string title: string
icon: string icon: string
selected: boolean selected: boolean
width?: "normal" | "wide"
children?: ReactNode children?: ReactNode
}) { }) {
return ( return (
<div <div
className={cn( className={cn(
"group relative rounded-lg border bg-background p-0.5 transition-all", "group relative rounded-lg border bg-background p-0.5 transition-all",
width === "wide" ? "w-[320px]" : "w-[280px]", "w-[242px]",
selected selected
? "border-[var(--g-selection-background)] shadow-[0_8px_24px_rgba(20,24,38,0.14)]" ? "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" : "border-border/80 shadow-sm hover:border-border hover:shadow-md"