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; +--- + +
+ { + inputs && + inputs.map( + ({ type = 'text', name, label = '', autocomplete = 'on', placeholder = '' }) => + name && ( +
+ {label && ( + + )} + +
+ ) + ) + } + + { + textarea && ( +
+ +