645b397396
This commit refactors the contact form into a more robust inquiries form, relocating it from `/contact-us` to a new `/inquires` route. Key changes include: - Renamed and moved the component from `ContactUs` to `Inquires`. - Updated form fields: removed "Company Name", added "Message", and renamed "Work Email" and "Phone Number" for clarity. - Implemented comprehensive client-side validation for all fields using `react-hook-form`. - Added a loading state to the submit button to provide user feedback during submission. - The form now automatically resets upon successful submission. - Introduced new reusable `TextareaGroup` and `Loading` components to support the enhanced form functionality.
21 lines
503 B
TypeScript
21 lines
503 B
TypeScript
function Loading({ size = "md" }: { size?: "sm" | "md" | "lg" }) {
|
|
const sizeClasses = {
|
|
sm: "w-4 h-4 border-2",
|
|
md: "w-8 h-8 border-3",
|
|
lg: "w-12 h-12 border-4",
|
|
};
|
|
|
|
return (
|
|
<div className="inline-block">
|
|
<div
|
|
className={`${sizeClasses[size]} border-gray-200 border-t-blue-600 rounded-full animate-spin`}
|
|
role="status"
|
|
aria-label="Loading">
|
|
<span className="sr-only">Loading...</span>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default Loading;
|