feat(nav): current-language badge (HU/EN/DE) on the rail language switcher
The icon-only rail switcher now shows the active language code as a small corner badge, so the current language reads at a glance without opening the menu.
This commit is contained in:
parent
b59208e006
commit
c6fe94450b
1 changed files with 6 additions and 1 deletions
|
|
@ -92,9 +92,14 @@ export default function LanguageSwitcher({
|
||||||
onClick={toggleRail}
|
onClick={toggleRail}
|
||||||
title={current.label}
|
title={current.label}
|
||||||
aria-label={current.label}
|
aria-label={current.label}
|
||||||
className="p-2 rounded-lg text-muted hover:text-fg hover:bg-card transition"
|
className="relative p-2 rounded-lg text-muted hover:text-fg hover:bg-card transition"
|
||||||
>
|
>
|
||||||
<Globe className="w-5 h-5" />
|
<Globe className="w-5 h-5" />
|
||||||
|
{/* Current-language badge (HU/EN/DE) so the active language reads at a glance without
|
||||||
|
opening the menu. The ring matches the page background to detach it from the icon. */}
|
||||||
|
<span className="absolute -bottom-1 -right-1 text-[8px] font-bold leading-none px-1 py-[1px] rounded bg-accent text-accent-fg ring-2 ring-bg">
|
||||||
|
{current.code.toUpperCase()}
|
||||||
|
</span>
|
||||||
</button>
|
</button>
|
||||||
{open &&
|
{open &&
|
||||||
createPortal(
|
createPortal(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue