Skip to content

Commit

Permalink
Merge pull request DevMatrix1#11 from kotesh-arya/feat/email-form
Browse files Browse the repository at this point in the history
Feat/email form
  • Loading branch information
ANKIT9761 authored Feb 9, 2023
2 parents d296214 + 106ce26 commit 12b3c49
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 63 deletions.
78 changes: 16 additions & 62 deletions src/components/MailForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,80 +38,37 @@ const MailForm = () => {
"Content-Type": "application/x-www-form-urlencoded",
},
});
console.log(res);

console.log("ji");
}
return (
<div className=" pr-2 pt-2">
<div className=" m-auto mt-20 w-96 pr-2 pt-2">
{submit ? (
<div>Thanks, will get back to you soon</div>
<div className=" border-2 border-indigo-500/75 rounded-lg p-8 m-auto mt-40 w-96">
Thank you! , we will get back to you soon...
</div>
) : (
<form onSubmit={handleSubmit} target="_self">
{/* <label htmlFor="entry.1759328524">First Name</label>
<TextInput
withAsterisk
placeholder="John"
name="entry.1759328524"
onChange={handleInputData("entry.1759328524")}
value={formData["entry.1759328524"]}
autoComplete={"false"}
/>
<label htmlFor="entry.60803183">Last Name:</label>
<TextInput
name="entry.60803183"
onChange={handleInputData("entry.60803183")}
value={formData["entry.60803183"]}
autoComplete={"false"}
/>
<label htmlFor="entry.220097671">E-mail:</label>
<TextInput
name="entry.220097671"
onChange={handleInputData("entry.220097671")}
value={formData["entry.220097671"]}
autoComplete={"false"}
/>
<label htmlFor="entry.857691959">Message:</label>
<Textarea
// required
name="entry.857691959"
rows="4"
cols="10"
onChange={handleInputData("entry.857691959")}
value={formData["entry.857691959"]}
autoComplete={"false"}
></Textarea>
<Button type="submit">Submit</Button> */}

{
<div className="overflow-hidden shadow sm:rounded-md">
<div className="bg-white px-4 py-5 sm:p-6">
<div className="grid grid-cols-6 gap-6">
<div className="col-span-6 sm:col-span-3">
<div className="grid grid-cols-6 gap-6">
<div className="col-span-6 ">
<label
htmlFor="entry.1759328524"
className="block text-sm font-medium text-gray-700"
>
First name
</label>
<input
<input
type="text"
name="entry.1759328524"
onChange={handleInputData("entry.1759328524")}
value={formData["entry.1759328524"]}
autoComplete={"false"}
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm text-violet-500 focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm sm:text-sm"
/>
</div>

<div className="col-span-6 sm:col-span-3">
<div className="col-span-6 ">
<label
htmlFor="entry.60803183"
className="block text-sm font-medium text-gray-700"
Expand All @@ -120,30 +77,28 @@ const MailForm = () => {
</label>
<input
type="text"
// id="last-name"
name="entry.60803183"
onChange={handleInputData("entry.60803183")}
value={formData["entry.60803183"]}
autoComplete={"false"}
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 text-violet-500 focus:ring-indigo-500 sm:text-sm"
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm sm:text-sm"
/>
</div>

<div className="col-span-6 sm:col-span-4">
<div className="col-span-6 ">
<label
htmlFor="entry.220097671"
className="block text-sm font-medium text-gray-700"
>
Email address
</label>
<input
type="text"
// id="email-address"
type="email"
name="entry.220097671"
onChange={handleInputData("entry.220097671")}
value={formData["entry.220097671"]}
autoComplete={"false"}
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 text-violet-500 focus:ring-indigo-500 sm:text-sm"
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm sm:text-sm"
/>
</div>

Expand All @@ -155,24 +110,23 @@ const MailForm = () => {
Message
</label>
<Textarea
// id="street-address"
name="entry.857691959"
rows="4"
cols="10"
onChange={handleInputData("entry.857691959")}
value={formData["entry.857691959"]}
autoComplete={"false"}
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
className="mt-1 block w-full rounded-md border-gray-300 shadow-sm sm:text-sm"
></Textarea>
</div>
</div>
</div>
<div className="bg-gray-50 px-4 py-3 text-right sm:px-6">
<div className="bg-gray-50 px-4 py-3 text-center sm:px-6">
<button
type="submit"
className="inline-flex justify-center rounded-md border border-transparent bg-indigo-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"
>
Save
Submit
</button>
</div>
</div>
Expand Down
9 changes: 8 additions & 1 deletion src/index.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
@tailwind base;

@tailwind base;
@tailwind components;
@tailwind utilities;
/*
:root {
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 24px;
font-weight: 400;


0 comments on commit 12b3c49

Please sign in to comment.