diff --git a/src/components/ThemeToggle.tsx b/src/components/ThemeToggle.tsx index ba2de81..0aac553 100644 --- a/src/components/ThemeToggle.tsx +++ b/src/components/ThemeToggle.tsx @@ -59,71 +59,21 @@ export default function ThemeToggle({ variant = 'inline' }: ThemeToggleProps) { } if (variant === 'row') { - // Compact, cell-friendly layout: a small leading icon plus a segmented - // dark/light control that flexes to fill the available width. No "theme" - // word label, so it fits a half-width grid cell down to ~350px. + // Match the other compact-menu rows exactly: an icon + label button using + // the shared .compact-nav-link styling. Clicking toggles dark/light; the + // moon/sun icon reflects the current theme. + const rowNext: Theme = theme === 'dark' ? 'light' : 'dark'; return ( -
pick(rowNext)} + aria-label={`Switch to ${rowNext} mode`} + className="compact-nav-link" + style={{ font: 'inherit', textAlign: 'left', width: '100%' }} > - - {theme === 'light' ? : } - -
- {(['dark', 'light'] as const).map((value) => { - const active = theme === value; - return ( - - ); - })} -
-
+ {theme === 'dark' ? : } + theme + ); }