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

@@ -5,13 +5,13 @@ import { API, Channel, Message, Server, User } from "revolt.js";
import { createContext } from "preact";
import { useContext, useEffect, useMemo, useState } from "preact/hooks";
import type { Action } from "@revoltchat/ui/esm/components/design/atoms/layout/Modal";
import { internalSubscribe } from "../../lib/eventEmitter";
import { determineLink } from "../../lib/links";
import { useApplicationState } from "../../mobx/State";
import { Action } from "../../components/ui/Modal";
import { Children } from "../../types/Preact";
import Modals from "./Modals";
@@ -24,7 +24,7 @@ export type Screen =
| { id: "clipboard"; text: string }
| { id: "token_reveal"; token: string; username: string }
| { id: "external_link_prompt"; link: string }
| { id: "sessions", confirm: () => void }
| { id: "sessions"; confirm: () => void }
| {
id: "_prompt";
question: Children;