import { useImperativeHandle, type FormHTMLAttributes, useRef, forwardRef, type Ref } from "react"; import { clsn } from "~utils"; import styles from "./form.module.less"; interface FormProps extends FormHTMLAttributes { } function Form({ children, className, ...props }: FormProps, ref: Ref) { const formRef = useRef(); useImperativeHandle(ref, () => { return formRef.current; }, []); return (
{children}
); } export default forwardRef(Form);