diff --git a/app/_components/FooterForm.tsx b/app/_components/FooterForm.tsx index 7364666..415defd 100644 --- a/app/_components/FooterForm.tsx +++ b/app/_components/FooterForm.tsx @@ -1,9 +1,9 @@ -import ContactUs from "../_contact-us/page"; +import Inquires from "../_inquires/page"; const FooterForm = () => { return (
- +
); }; diff --git a/app/_components/Loading.tsx b/app/_components/Loading.tsx new file mode 100644 index 0000000..21496aa --- /dev/null +++ b/app/_components/Loading.tsx @@ -0,0 +1,20 @@ +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 ( +
+
+ Loading... +
+
+ ); +} + +export default Loading; diff --git a/app/_components/Textarea.tsx b/app/_components/Textarea.tsx new file mode 100644 index 0000000..54b7e25 --- /dev/null +++ b/app/_components/Textarea.tsx @@ -0,0 +1,61 @@ +"use client"; +import { useState } from "react"; +import { RegisterOptions, UseFormRegister } from "react-hook-form"; + +function TextareaGroup({ + id, + label, + register, + validation, + error, +}: { + label: string; + id: string; + register: UseFormRegister; + validation?: RegisterOptions; + error?: string; +}) { + const [isFocused, setIsFocused] = useState(false); + const [hasValue, setHasValue] = useState(false); + + const { onChange, ...rest } = register(id, validation); + + const handleChange = (e: React.ChangeEvent) => { + setHasValue(e.target.value !== ""); + onChange(e); + }; + + return ( +
+
+