Skip to content

Commit db6f0a5

Browse files
committed
add auto height adjust also for OR block
1 parent c6377ec commit db6f0a5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

logic-editor/src/App.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,11 @@ function AndNode({ data, id }: any) {
223223

224224
function OrNode({ data, id }: any) {
225225
const { inputs = 2 } = data;
226+
const handleSpacing = 15;
227+
const baseHeight = 50;
228+
const dynamicHeight = baseHeight + (inputs - 3) * handleSpacing;
226229
return (
227-
<div className={`${nodeBaseClasses} w-28 min-h-12 bg-purple-500 border-2 border-purple-700`}>
230+
<div className={`${nodeBaseClasses} w-28 min-h-12 bg-purple-500 border-2 border-purple-700`} style={{ minHeight: dynamicHeight }}>
228231
<div className={titleClasses}>OR</div>
229232
{Array.from({ length: inputs }).map((_, idx) => (
230233
<Handle

0 commit comments

Comments
 (0)