feat(@ui): port Modal component

This commit is contained in:
Paul Makles
2022-05-30 15:45:14 +01:00
parent 68b9d5ea79
commit 41e533ab59
21 changed files with 58 additions and 326 deletions

View File

@@ -2,8 +2,6 @@ import { useContext } from "preact/hooks";
import { internalEmit } from "../../lib/eventEmitter";
import { isModalClosing } from "../../components/ui/Modal";
import { IntermediateContext, useIntermediate } from "./Intermediate";
import { SpecialInputModal } from "./modals/Input";
import { SpecialPromptModal } from "./modals/Prompt";
@@ -21,9 +19,9 @@ export default function Popovers() {
const { openScreen } = useIntermediate();
const onClose = () =>
isModalClosing
? openScreen({ id: "none" })
: internalEmit("Modal", "close");
//isModalClosing
openScreen({ id: "none" });
//: internalEmit("Modal", "close");
switch (screen.id) {
case "profile":