mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-20 18:10:08 +02:00
* feat(ControlsList): Add ControlsList component * fix(ControlsList): replace default export with named export
18 lines
539 B
TypeScript
18 lines
539 B
TypeScript
import { findModuleChild } from '../webpack';
|
|
import { FC } from 'react';
|
|
|
|
export interface ControlsListProps {
|
|
alignItems?: 'left' | 'right' | 'center';
|
|
spacing?: 'standard' | 'extra';
|
|
}
|
|
|
|
export const ControlsList: FC<ControlsListProps> = findModuleChild((m) => {
|
|
if (typeof m !== 'object') return;
|
|
for (const prop in m) {
|
|
if (m[prop]?.toString && m[prop].toString().includes('().ControlsListChild') && m[prop].toString().includes('().ControlsListOuterPanel')) {
|
|
return m[prop];
|
|
}
|
|
}
|
|
return;
|
|
});
|