summaryrefslogtreecommitdiff
path: root/src/components/Form.tsx
blob: 595e323e54749dca4eaeb11db8b07d24b3675746 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { ComponentChildren } from 'preact';
import './Form.css';

export interface FormProps {
	children: ComponentChildren;
	onSubmit?: (event: SubmitEvent) => void;
}

const Form = ({ onSubmit, children }: FormProps) => {
	return (
		<form class="__Form" onSubmit={onSubmit}>
			{children}
		</form>
	);
};

export default Form;