mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-08 14:13:01 -04:00
parent
e563521416
commit
74c3930e0a
41 changed files with 141 additions and 87 deletions
|
@ -18,11 +18,11 @@ let modalId = 1337;
|
|||
*/
|
||||
export function openModal(Component: React.ComponentType, modalProps: Record<string, any>) {
|
||||
let key = `Vencord${modalId++}`;
|
||||
modals.openModal(props =>
|
||||
modals.openModal(props => (
|
||||
<Modal.ModalRoot {...props} {...modalProps}>
|
||||
<Component />
|
||||
</Modal.ModalRoot>
|
||||
, { modalKey: key });
|
||||
), { modalKey: key });
|
||||
|
||||
return key;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue