From 7d82a82e9c4db59832593cb6f0f78775b252dc69 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Wed, 22 Jun 2022 21:44:41 -0400 Subject: [PATCH] feat(components): add Field --- src/deck-components/Field.tsx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/deck-components/Field.tsx diff --git a/src/deck-components/Field.tsx b/src/deck-components/Field.tsx new file mode 100644 index 0000000..a752e0c --- /dev/null +++ b/src/deck-components/Field.tsx @@ -0,0 +1,22 @@ +import { FC, HTMLAttributes, ReactNode, RefAttributes } from 'react'; +import { findModuleChild } from '../webpack'; + +export interface FieldProps extends HTMLAttributes { + title?: string; + description?: boolean; + 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>;