mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-19 01:20:20 +02:00
feat: add components found while working on tabmaster
This commit is contained in:
@@ -154,3 +154,16 @@ export const ModalRoot = (Object.values(
|
||||
}
|
||||
}
|
||||
})) as FC<ModalRootProps>;
|
||||
|
||||
interface SimpleModalProps{
|
||||
active?: boolean,
|
||||
children: ReactNode
|
||||
}
|
||||
|
||||
const ModalModule = findModuleChild((mod) => {
|
||||
if (typeof mod !== 'object' || !mod.__esModule) return undefined;
|
||||
if (mod.SimpleModal && mod.ModalPosition) return mod;
|
||||
})
|
||||
|
||||
export const SimpleModal = ModalModule.SimpleModal as FC<SimpleModalProps>
|
||||
export const ModalPosition = ModalModule.ModalPosition as FC<SimpleModalProps>
|
||||
@@ -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;
|
||||
|
||||
14
src/deck-components/Scroll.tsx
Normal file
14
src/deck-components/Scroll.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { FC, ReactNode } from "react";
|
||||
import { findModuleChild } from "../webpack";
|
||||
|
||||
const ScrollingModule = findModuleChild((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;
|
||||
})
|
||||
@@ -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';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user