mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-21 10:29:00 +02:00
feat(components): add FocusRing
This commit is contained in:
18
src/deck-components/FocusRing.ts
Normal file
18
src/deck-components/FocusRing.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { ElementType, FC, ReactNode } from "react";
|
||||
import { findModuleChild } from "../webpack";
|
||||
|
||||
export interface FocusRingProps {
|
||||
className?: string,
|
||||
rootClassName?: string,
|
||||
render?: ElementType,
|
||||
children?: ReactNode,
|
||||
NavigationManager?: any
|
||||
}
|
||||
|
||||
export const FocusRing = findModuleChild((m: any) => {
|
||||
if (typeof m !== 'object') return false;
|
||||
for (let prop in m) {
|
||||
if (m[prop]?.toString()?.includes('.GetShowDebugFocusRing())')) return m[prop];
|
||||
}
|
||||
return false;
|
||||
}) as FC<FocusRingProps>;
|
||||
@@ -4,6 +4,7 @@ export * from './Carousel';
|
||||
export * from './Dropdown';
|
||||
export * from './Field';
|
||||
export * from './Focusable';
|
||||
export * from './FocusRing';
|
||||
export * from './FooterLegend';
|
||||
export * from './Menu';
|
||||
export * from './Modal';
|
||||
|
||||
Reference in New Issue
Block a user