import * as React from 'react';

interface IFormProps extends React.HTMLProps<HTMLFormElement> {
    children: any,
    onSubmit?: (event: React.FormEvent<HTMLFormElement>) => void;
}

export const Form = ({ onSubmit, children, ...rest }: IFormProps) => (
    <form {...rest} onSubmit={onSubmit}>
        {children}
    </form>
);
