diff --git a/src/components/ui/Form.astro b/src/components/ui/Form.astro
new file mode 100644
index 0000000..da4bec8
--- /dev/null
+++ b/src/components/ui/Form.astro
@@ -0,0 +1,86 @@
+---
+import { Form } from '~/types';
+
+const { inputs, textarea, disclaimer, button = 'Contact us', description = '' } = Astro.props as Form;
+---
+
+
diff --git a/src/components/widgets/Contact.astro b/src/components/widgets/Contact.astro
new file mode 100644
index 0000000..a4162dd
--- /dev/null
+++ b/src/components/widgets/Contact.astro
@@ -0,0 +1,40 @@
+---
+import FormContainer from '~/components/ui/Form.astro';
+import Headline from '~/components/ui/Headline.astro';
+import WidgetWrapper from '~/components/ui/WidgetWrapper.astro';
+import { Contact } from '~/types';
+
+const {
+ title = await Astro.slots.render('title'),
+ subtitle = await Astro.slots.render('subtitle'),
+ tagline = await Astro.slots.render('tagline'),
+ inputs,
+ textarea,
+ disclaimer,
+ button,
+ description,
+
+ id,
+ isDark = false,
+ classes = {},
+ bg = await Astro.slots.render('bg'),
+} = Astro.props as Contact;
+---
+
+
+
+
+ {
+ inputs && (
+
+
+
+ )
+ }
+
diff --git a/src/pages/contact.astro b/src/pages/contact.astro
index a9494d9..59c35b3 100644
--- a/src/pages/contact.astro
+++ b/src/pages/contact.astro
@@ -1,11 +1,35 @@
---
import Layout from '~/layouts/PageLayout.astro';
+import ContactUs from '~/components/widgets/Contact.astro';
const metadata = {
- title: "Contact",
+ title: 'Contact',
};
---
- Contact
+
diff --git a/src/types.d.ts b/src/types.d.ts
index 6ae93e2..81e78c1 100644
--- a/src/types.d.ts
+++ b/src/types.d.ts
@@ -153,6 +153,24 @@ export interface Testimonial {
image?: string | unknown;
}
+export interface Input {
+ type: HTMLInputTypeAttribute;
+ name: string;
+ label?: string;
+ autocomplete?: string;
+ placeholder?: string;
+}
+
+export interface Textarea {
+ label?: string;
+ placeholder?: string;
+ rows?: number;
+}
+
+export interface Disclaimer {
+ label?: string;
+}
+
// COMPONENTS
export interface CallToAction {
targetBlank?: boolean;
@@ -177,6 +195,14 @@ export interface Collapse {
classes?: Record;
}
+export interface Form {
+ inputs?: Array;
+ textarea?: Textarea;
+ disclaimer?: Disclaimer;
+ button?: string;
+ description?: string;
+}
+
// WIDGETS
export interface Hero extends Headline, Widget {
content?: string;
@@ -247,3 +273,5 @@ export interface Content extends Headline, Widget {
isReversed?: boolean;
isAfterContent?: boolean;
}
+
+export interface Contact extends Headline, Form, Widget {}