import React from 'react'; interface IForm { /** Form submission event handler. */ onSubmit?: (event: React.FormEvent) => void, /** Class name override for the
element. */ className?: string, } /** Form element with custom styles. */ const Form: React.FC = ({ onSubmit, children, ...filteredProps }) => { const handleSubmit = React.useCallback((event) => { event.preventDefault(); if (onSubmit) { onSubmit(event); } }, [onSubmit]); return ( {children} ); }; export default Form;