mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-28 01:33:31 +08:00
fix(canvas): replace panel toggle icon with SlidersHorizontal and add pressed/unpressed visual states (#13286)
Co-authored-by: Olayinka Adelakun <olayinkaadelakun@mac.war.can.ibm.com>
This commit is contained in:
@ -137,7 +137,12 @@ const CanvasControls = ({
|
||||
unstyled
|
||||
size="icon"
|
||||
data-testid="canvas_controls_toggle_inspector"
|
||||
className="group flex h-8 w-8 items-center justify-center rounded-md hover:bg-muted"
|
||||
aria-pressed={inspectionPanelVisible}
|
||||
className={`group flex h-8 w-8 items-center justify-center rounded-md ${
|
||||
inspectionPanelVisible
|
||||
? "bg-muted text-foreground"
|
||||
: "hover:bg-muted"
|
||||
}`}
|
||||
title={
|
||||
!selectedNode
|
||||
? "Select a node to open the Inspector Panel"
|
||||
@ -148,8 +153,12 @@ const CanvasControls = ({
|
||||
onClick={() => setInspectionPanelVisible(!inspectionPanelVisible)}
|
||||
>
|
||||
<ForwardedIconComponent
|
||||
name={inspectionPanelVisible ? "PanelRightClose" : "PanelRight"}
|
||||
className="!h-5 !w-5 text-muted-foreground group-hover:text-foreground"
|
||||
name="SlidersHorizontal"
|
||||
className={`!h-5 !w-5 ${
|
||||
inspectionPanelVisible
|
||||
? "text-foreground"
|
||||
: "text-muted-foreground group-hover:text-foreground"
|
||||
}`}
|
||||
/>
|
||||
</Button>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user