Skip to content

Commit bd3579d

Browse files
authored
Give header panel toggles a visible on-state (#513)
The three panel-toggle buttons in the header (sidebar / split / inspector) previously signalled their state only through a **one-shade text-colour shift** from `text-fg-3` to `text-fg-2` — so subtle that the buttons looked identical whether the panel they controlled was open or closed. Each toggle now wears a **filled `bg-surface-2` pill with `text-fg`** while active, matching the `data-active` convention already used by `SubPanelTabBar` and `ScrollToBottom`. Inactive toggles keep their existing hover treatment, so the contrast between "off" and "hovering over off" stays intact. *No behavioural change — the `active` prop wiring, the click handlers, and the underlying panel stores are untouched; only the classList on `PanelToggleIcon` was adjusted.* ### Try it locally ```sh nix run github:juspay/kolu/fix/panel-toggle-active-indication ```
1 parent 267cfbf commit bd3579d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

packages/client/src/Header.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ const PanelToggleIcon: Component<{
4545
<Tip label={props.label}>
4646
<button
4747
data-testid={props["data-testid"]}
48-
class="flex items-center justify-center w-6 h-6 rounded hover:bg-surface-2 text-fg-3 hover:text-fg transition-colors cursor-pointer"
49-
classList={{ "text-fg-2": props.active }}
48+
class="flex items-center justify-center w-6 h-6 rounded transition-colors cursor-pointer"
49+
classList={{
50+
"bg-surface-2 text-fg": props.active,
51+
"text-fg-3 hover:bg-surface-2 hover:text-fg": !props.active,
52+
}}
53+
data-active={props.active ? "" : undefined}
5054
onClick={props.onClick}
5155
aria-label={props.label}
5256
>

0 commit comments

Comments
 (0)