chore(mobile/tab_switcher): create empty modal

This commit is contained in:
Elian Doran 2026-01-31 15:59:38 +02:00
parent a45fb975c0
commit 3a9b448a83
No known key found for this signature in database
2 changed files with 34 additions and 3 deletions

View File

@ -0,0 +1,6 @@
.modal.tab-bar-modal {
.modal-dialog {
max-height: unset;
height: 95vh;
}
}

View File

@ -1,15 +1,40 @@
import "./TabSwitcher.css";
import { createPortal } from "preact/compat";
import { useState } from "preact/hooks";
import { LaunchBarActionButton } from "../launch_bar/launch_bar_widgets";
import Modal from "../react/Modal";
export default function TabSwitcher() {
const [ shown, setShown ] = useState(false);
return (
<>
<LaunchBarActionButton
icon="bx bx-rectangle"
text="Tabs"
onClick={() => {
}}
onClick={() => setShown(true)}
/>
{createPortal(<TabBarModal shown={shown} setShown={setShown} />, document.body)}
</>
);
}
function TabBarModal({ shown, setShown }: {
shown: boolean;
setShown: (newValue: boolean) => void;
}) {
return (
<Modal
className="tab-bar-modal"
size="xl"
title="Tabs"
show={shown}
onHidden={() => setShown(false)}
>
Hi
</Modal>
);
}