mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-22 10:58:46 +02:00
23 lines
733 B
TypeScript
23 lines
733 B
TypeScript
import { FC, HTMLAttributes, ReactNode, RefAttributes } from 'react';
|
|
import { findModuleChild } from '../webpack';
|
|
|
|
export interface FieldProps extends HTMLAttributes<HTMLDivElement> {
|
|
label?: string | ReactNode;
|
|
description?: string | ReactNode;
|
|
disabled?: boolean;
|
|
icon?: ReactNode;
|
|
childrenLayout?: string;
|
|
childrenContainerWidth?: string;
|
|
padding?: string;
|
|
highlightOnFocus?: boolean;
|
|
indentLevel?: number;
|
|
verticalAlignment?: string;
|
|
}
|
|
|
|
export const Field = findModuleChild((m) => {
|
|
if (typeof m !== "object") return undefined;
|
|
for (let prop in m) {
|
|
if (m[prop]?.render?.toString().includes('"shift-children-below"')) return m[prop]
|
|
}
|
|
}) as FC<FieldProps & RefAttributes<HTMLDivElement>>;
|