This commit is contained in:
Saahil dutta 2024-06-22 17:44:06 -04:00
parent b52e25d57f
commit f6167cb3e6
5 changed files with 45 additions and 3 deletions

View file

@ -36,10 +36,10 @@ if(Math.random() > .5) {
}
}
const ui = (f: any) => (e: any) => f(e.target.value)
return <div className="hero min-h-screen">
return <div className="hero min-h-screen ">
<div className="hero-content text-center">
<div className="max-w-md">
<h1 className="text-5xl font-bold text-highlight">Contact Form</h1>
<h1 className="text-5xl font-bold text-highlight mt-10">Contact Form</h1>
{/* <p className="py-6">Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda excepturi exercitationem quasi. In deleniti eaque aut repudiandae et a id nisi.</p> */}
{(error || done) ? <FormResults error={error} email={email} done={done} /> : <ContactForm onSubmit={onSubmit}
email={email} uiE={ui(setEmail)}
@ -69,7 +69,7 @@ export function ContactForm({ onSubmit,
nameOfPerson, message, email,
uiE,uiN,uiM
}: any) {
return <form onSubmit={onSubmit} className="form mt-5">
return <form onSubmit={onSubmit} className="mt-5">
<label className="input input-bordered flex items-center mb-2">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="var(--mauve)" className="w-4 h-4 opacity-70"><path d="M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z" /><path d="M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z" /></svg>
<input required type="email" className="grow" placeholder="Email" value={email} onChange={uiE} />