Skip to content

Commit 73f656f

Browse files
committed
Keep bowtie nodes lane-width fixed and wrap long text
1 parent f59e82c commit 73f656f

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/components/editor/BowtieNode.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export default function BowtieNode({ id, data, selected }: NodeProps<BowtieNodeU
9090
) : null}
9191

9292
<div
93-
className="min-w-52 rounded-lg border-2 bg-white p-3 shadow-sm"
93+
className="w-52 min-w-52 max-w-52 rounded-lg border-2 bg-white p-3 shadow-sm"
9494
style={{
9595
borderColor: meta.color,
9696
backgroundColor: isEscalation ? supportBg : undefined,
@@ -105,8 +105,14 @@ export default function BowtieNode({ id, data, selected }: NodeProps<BowtieNodeU
105105
</div>
106106
) : null}
107107
<div className="text-xs font-semibold uppercase tracking-wide text-zinc-500">{meta.label}</div>
108-
<div className="mt-1 text-sm font-semibold text-zinc-900">{data.title || "Untitled"}</div>
109-
{data.description ? <div className="mt-1 text-xs text-zinc-600">{data.description}</div> : null}
108+
<div className="mt-1 break-words whitespace-normal text-sm font-semibold leading-tight text-zinc-900">
109+
{data.title || "Untitled"}
110+
</div>
111+
{data.description ? (
112+
<div className="mt-1 break-words whitespace-pre-wrap text-xs leading-snug text-zinc-600">
113+
{data.description}
114+
</div>
115+
) : null}
110116
</div>
111117
<Handle type="target" position={Position.Left} />
112118
<Handle type="source" position={Position.Right} />

0 commit comments

Comments
 (0)