import { useState, useEffect, HTMLAttributes } from "react"; import "./FormBody.css"; import { getCN, randomId, clickDetective } from "../../components/utils"; export interface IFormBody extends HTMLAttributes { before?: React.ReactNode; after?: React.ReactNode; top?: React.ReactNode; top_after?: React.ReactNode; bottom?: React.ReactNode; formClassName?: string | undefined; } function FormBody({ children, before, after, top, top_after, bottom, formClassName, ...props }: IFormBody) { const [props_id, setPropsId] = useState(randomId(props.id, `formbody`)); return (
{top &&
{top}
} {top_after &&
{top_after}
}
{before &&
{before}
} {children} {after &&
{after}
}
{bottom &&
{bottom}
}
); } export default FormBody;