From 052cc1a5a4668d7cb17fb273a022aa5b820d1faa Mon Sep 17 00:00:00 2001
From: Sam Nystrom <sam@samnystrom.dev>
Date: Wed, 13 Mar 2024 05:03:22 +0000
Subject: refactor: move styles into separate components

---
 src/components/Form.tsx | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 src/components/Form.tsx

(limited to 'src/components/Form.tsx')

diff --git a/src/components/Form.tsx b/src/components/Form.tsx
new file mode 100644
index 0000000..595e323
--- /dev/null
+++ b/src/components/Form.tsx
@@ -0,0 +1,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;
\ No newline at end of file
-- 
cgit v1.2.3

