mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-21 10:29:00 +02:00
feat(components): add HorizontalFocus
This commit is contained in:
15
src/deck-components/Focusable.tsx
Normal file
15
src/deck-components/Focusable.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import { ReactNode, VFC } from "react";
|
||||
import { findModuleChild } from "../webpack";
|
||||
|
||||
export interface FocusableProps {
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
export const HorizontalFocus = findModuleChild(m => {
|
||||
if (typeof m !== "object") return undefined;
|
||||
for (let prop in m) {
|
||||
if (m[prop]?.toString()?.includes('"children","alignItems","spacing"')) {
|
||||
return m[prop];
|
||||
}
|
||||
}
|
||||
}) as VFC<FocusableProps>;
|
||||
Reference in New Issue
Block a user