Make ModeSwitch Dropdown focus aware

This commit is contained in:
nocnico
2025-06-03 21:16:36 +02:00
parent e191618483
commit 4602f90652

View File

@@ -8,12 +8,15 @@ export default function ModeSwitchDropdown() {
const path = usePathname();
return (
<details className="dropdown z-[9999]">
<summary className="btn m-1">
<div className="dropdown z-[9999]">
<div tabIndex={0} role="button" className="btn m-1">
<ArrowLeftRight /> {path.includes("pilot") && "Pilot"}
{path.includes("dispatch") && "Leitstelle"}
</summary>
<ul className="menu dropdown-content bg-base-100 rounded-box z-1 w-52 p-2 shadow-sm">
</div>
<ul
tabIndex={0}
className="menu dropdown-content bg-base-100 rounded-box z-1 w-52 p-2 shadow-sm"
>
<li>
<Link href={"/dispatch"}>
<Workflow /> Leitstelle
@@ -25,6 +28,6 @@ export default function ModeSwitchDropdown() {
</Link>
</li>
</ul>
</details>
</div>
);
}