add nav and footer

This commit is contained in:
2025-03-16 17:11:17 -03:00
parent d4bb54017d
commit bfc1114090
11 changed files with 206 additions and 60 deletions

View File

@@ -0,0 +1,42 @@
import { useForm } from "react-hook-form";
interface IFormInput {
name: string;
email: string;
}
export function Form() {
const { register, handleSubmit } = useForm<IFormInput>();
const onSubmit = async (data: IFormInput) => {
console.log(data);
};
return (
<form onSubmit={handleSubmit(onSubmit)} className="flex flex-col gap-2.5">
<label>
Nome
<Input {...register("name")} />
</label>
<label>
Email
<Input {...register("email")} />
</label>
<button
type="submit"
className="font-medium bg-green-secondary hover:bg-green-support p-2.5 rounded-lg transition cursor-pointer h-12"
>
Quero um orçamento
</button>
</form>
);
}
export function Input({ ...props }) {
return (
<input
className="border border-gray-300 focus:border-green-secondary focus:ring ring-green-secondary bg-white px-5 rounded-lg w-full outline-none h-12"
{...props}
/>
);
}