mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-20 10:00:08 +02:00
13 lines
385 B
TypeScript
13 lines
385 B
TypeScript
import { ReactNode } from 'react';
|
|
|
|
import { findModuleChild } from '../webpack';
|
|
|
|
export const showModal: (children: ReactNode, parent: EventTarget) => void = findModuleChild((m) => {
|
|
if (typeof m !== 'object') return undefined;
|
|
for (let prop in m) {
|
|
if (typeof m[prop] === 'function' && m[prop].toString().includes('stopPropagation))')) {
|
|
return m[prop];
|
|
}
|
|
}
|
|
});
|