mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
Fixed minimize to show past 3 lines and changed color to align with rest of application
This commit is contained in:
@@ -196,11 +196,11 @@ export function Code({ blockId, subBlockId, isConnecting, minimizable }: CodePro
|
||||
onDragOver={(e) => e.preventDefault()}
|
||||
onDrop={handleDrop}
|
||||
>
|
||||
{minimizable && code.length > 0 && (
|
||||
{minimizable && code.length > 0 && lineCount > 3 && (
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="absolute right-2 top-2 z-10 h-6 w-6 hover:bg-accent hover:text-accent-foreground"
|
||||
className="absolute right-2 top-2 z-10 h-6 w-6 text-muted-foreground hover:bg-muted hover:text-foreground"
|
||||
onClick={() => setIsMinimized(!isMinimized)}
|
||||
>
|
||||
{isMinimized ? <ChevronDown className="h-4 w-4" /> : <ChevronUp className="h-4 w-4" />}
|
||||
|
||||
@@ -32,21 +32,6 @@ export const ConditionBlock: BlockConfig<CodeExecutionOutput> = {
|
||||
title: 'if',
|
||||
type: 'code',
|
||||
layout: 'full',
|
||||
outputHandle: true,
|
||||
},
|
||||
{
|
||||
id: 'else-if',
|
||||
title: 'else if',
|
||||
type: 'code',
|
||||
layout: 'full',
|
||||
outputHandle: true,
|
||||
},
|
||||
{
|
||||
id: 'else',
|
||||
title: 'else',
|
||||
type: 'code',
|
||||
layout: 'full',
|
||||
outputHandle: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user