diff options
author | megumin <megumin.bakaretsurie@gmail.com> | 2022-10-17 20:18:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-17 20:18:25 +0100 |
commit | 5625d63e46c43132676148a86739025c15fa5f2d (patch) | |
tree | 3699e126ad86cc2972b3aecfe4eeaef378e9e9f4 /src/plugins/viewIcons.tsx | |
parent | ae730e83984cbf4dc804eebbf260a055bfe635c0 (diff) | |
download | Vencord-5625d63e46c43132676148a86739025c15fa5f2d.tar.gz Vencord-5625d63e46c43132676148a86739025c15fa5f2d.tar.bz2 Vencord-5625d63e46c43132676148a86739025c15fa5f2d.zip |
Settings 2.0 (#107)
Co-authored-by: Vendicated <vendicated@riseup.net>
Diffstat (limited to 'src/plugins/viewIcons.tsx')
-rw-r--r-- | src/plugins/viewIcons.tsx | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/plugins/viewIcons.tsx b/src/plugins/viewIcons.tsx index a55b8b8..d6cbf60 100644 --- a/src/plugins/viewIcons.tsx +++ b/src/plugins/viewIcons.tsx @@ -1,7 +1,7 @@ import { Devs } from "../utils/constants"; import definePlugin from "../utils/types"; import { lazyWebpack, makeLazy } from "../utils/misc"; -import { ModalSize, openModal } from "../utils/modal"; +import { ModalRoot, ModalSize, openModal } from "../utils/modal"; import { find } from "../webpack"; import { React } from "../webpack/common"; @@ -15,14 +15,16 @@ export default definePlugin({ description: "Makes Avatars/Banners in user profiles clickable, and adds Guild Context Menu Entries to View Banner/Icon.", openImage(url: string) { - openModal(() => ( - <ImageModal - shouldAnimate={true} - original={url} - src={url} - renderLinkComponent={props => React.createElement(getMaskedLink(), props)} - /> - ), { size: ModalSize.DYNAMIC }); + openModal(modalProps => ( + <ModalRoot size={ModalSize.DYNAMIC} {...modalProps}> + <ImageModal + shouldAnimate={true} + original={url} + src={url} + renderLinkComponent={props => React.createElement(getMaskedLink(), props)} + /> + </ModalRoot> + )); }, patches: [ |