diff --git a/src/deck-components/Modal.tsx b/src/deck-components/Modal.tsx index e3d6329..f424007 100755 --- a/src/deck-components/Modal.tsx +++ b/src/deck-components/Modal.tsx @@ -154,3 +154,16 @@ export const ModalRoot = (Object.values( } } })) as FC; + +interface SimpleModalProps{ + active?: boolean, + children: ReactNode +} + +const ModalModule = findModule((mod) => { + if (typeof mod !== 'object' || !mod.__esModule) return undefined; + if (mod.SimpleModal && mod.ModalPosition) return mod; +}) + +export const SimpleModal = ModalModule.SimpleModal as FC +export const ModalPosition = ModalModule.ModalPosition as FC \ No newline at end of file diff --git a/src/deck-components/Panel.tsx b/src/deck-components/Panel.tsx index 629d5d0..1efc002 100644 --- a/src/deck-components/Panel.tsx +++ b/src/deck-components/Panel.tsx @@ -2,6 +2,11 @@ import { FC, ReactNode } from 'react'; import { findModuleChild } from '../webpack'; +export const Panel: FC<{ children?: ReactNode; }> = findModuleChild((mod) => { + if (typeof mod !== 'object' || !mod.__esModule) return undefined; + return mod.Panel; +}) + export interface PanelSectionProps { title?: string; spinner?: boolean; diff --git a/src/deck-components/Scroll.tsx b/src/deck-components/Scroll.tsx new file mode 100644 index 0000000..6c2e0e1 --- /dev/null +++ b/src/deck-components/Scroll.tsx @@ -0,0 +1,14 @@ +import { FC, ReactNode } from "react"; +import { findModuleChild, findModule } from "../webpack"; + +const ScrollingModule = findModule((mod) => { + if (typeof mod !== 'object' || !mod.__esModule) return undefined; + if (mod.ScrollPanel) return mod; +}); + +export const ScrollPanel: FC<{ children?: ReactNode; }> = ScrollingModule.ScrollPanel; + +export const ScrollPanelGroup: FC<{ children?: ReactNode; }> = findModuleChild((mod) => { + if (typeof mod !== 'object' || !mod.__esModule) return undefined; + return mod.ScrollPanelGroup; +}) \ No newline at end of file diff --git a/src/deck-components/index.ts b/src/deck-components/index.ts index 11e45e5..65807d4 100755 --- a/src/deck-components/index.ts +++ b/src/deck-components/index.ts @@ -25,6 +25,7 @@ export * from './TextField'; export * from './Toggle'; export * from './ToggleField'; export * from './SteamClient'; +export * from './Scroll'; import { AppDetails, LogoPosition, SteamAppOverview, SteamClient } from './SteamClient';