import { FC } from "react"; import { FMLocal, FieldLocal, FieldProp } from "../typings"; import { InputText } from "./input/InputText"; import { Skeleton } from "@/comps/ui/skeleton"; export const FieldInput: FC<{ field: FieldLocal; fm: FMLocal }> = ({ field, fm, }) => { const prefix = typeof field.prefix === "function" ? field.prefix() : null; const suffix = typeof field.suffix === "function" ? field.suffix() : null; return (
div { min-height: 35px; line-height: 35px; } ` )} > {prefix && <>} {fm.status === "loading" ? (
) : (
{(["text", "password", "number"] as FieldProp["type"][]).includes( field.type ) && }
)} {suffix && <>}
); };