From 6099179f0230e3c6eb449a2cd7f6a5c5d79201f2 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 8 Sep 2022 22:25:21 +0200 Subject: ViewIcons: Now opens icons in image viewer --- src/utils/modal.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/utils') diff --git a/src/utils/modal.tsx b/src/utils/modal.tsx index 5628ebe..63821f3 100644 --- a/src/utils/modal.tsx +++ b/src/utils/modal.tsx @@ -1,8 +1,8 @@ import Components from "discord-types/components"; import { waitFor } from "../webpack"; -let Modal: Components.Modal; -let modals: any; +export let Modal: Components.Modal; +export let modals: any; waitFor("openModalLazy", m => modals = m); waitFor("ModalRoot", m => Modal = m); @@ -14,10 +14,10 @@ let modalId = 1337; * @param Component The component to render in the modal * @returns The key of this modal. This can be used to close the modal later with closeModal */ -export function openModal(Component: React.ComponentType) { +export function openModal(Component: React.ComponentType, modalProps: Record) { let key = `Vencord${modalId++}`; modals.openModal(props => - + , { modalKey: key }); -- cgit