-
-
- Enquire about joining this thriving community at the heart
- of Abu Hamour by contacting a member of our sales team today
-
-
-
+
+
+
+
);
}
diff --git a/src/index.css b/src/index.css
index 959abe5..458a7ea 100644
--- a/src/index.css
+++ b/src/index.css
@@ -10,19 +10,19 @@ body {
@layer utilities {
.button-l {
- @apply 2xl:text-[1.111vw] text-base leading-[115%] tracking-[-4%];
+ @apply 2xl:text-[1.111vw] text-base leading-[115%];
}
.button-m {
- @apply 2xl:text-[0.972vw] text-sm leading-[115%] tracking-[-4%];
+ @apply 2xl:text-[0.972vw] text-sm leading-[115%];
}
.button-s {
- @apply 2xl:text-[0.833vw] text-xs leading-[115%] tracking-[-4%];
+ @apply 2xl:text-[0.833vw] text-xs leading-[115%];
}
.h1 {
- @apply 2xl:text-[5.556vw] md:text-[10.417vw] text-[22.222vw] leading-[90%] tracking-[-4%];
+ @apply 2xl:text-[5.556vw] md:text-[10.417vw] text-[22.222vw] leading-[90%];
}
.h2 {
@@ -30,19 +30,19 @@ body {
}
.h3 {
- @apply 2xl:text-[2.222vw] md:text-[4.167vw] text-[8.889vw] leading-[110%] tracking-[-4%];
+ @apply 2xl:text-[2.222vw] md:text-[4.167vw] text-[8.889vw] leading-[110%];
}
.number {
- @apply 2xl:text-[4.444vw] md:text-[8.333vw] text-[8.889vw] md:leading-[100%] leading-[110%] tracking-[-4%];
+ @apply 2xl:text-[4.444vw] text-[64px] md:leading-[100%] leading-[110%];
}
.text-m {
- @apply 2xl:text-[1.111vw] md:text-[2.083vw] text-[4.444vw] 2xl:leading-[120%] leading-[130%] tracking-[-4%];
+ @apply 2xl:text-[1.111vw] text-base 2xl:leading-[120%] leading-[130%];
}
.text-s {
- @apply 2xl:text-[0.972vw] md:text-[1.823vw] text-[3.889vw] leading-[130%] tracking-[-4%];
+ @apply 2xl:text-[0.972vw] text-sm leading-[130%];
}
.caption {
diff --git a/src/main.tsx b/src/main.tsx
index 2eae740..f39909e 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -2,7 +2,7 @@ import { createRoot } from "react-dom/client";
import "./index.css";
import { createBrowserRouter, RouterProvider } from "react-router";
import DefaultLayout from "./components/layouts/DefaultLayout.tsx";
-import About from "./components/pages/AboutPage.tsx";
+import AboutPage from "./components/pages/AboutPage.tsx";
import ContactsPage from "./components/pages/ContactsPage.tsx";
const router = createBrowserRouter([
@@ -19,7 +19,7 @@ const router = createBrowserRouter([
},
{
path: "/about",
- element:
,
+ element:
,
},
{
path: "/contacts",
diff --git a/src/ui/Input.tsx b/src/ui/Input.tsx
index 69bc6a1..f7bc578 100644
--- a/src/ui/Input.tsx
+++ b/src/ui/Input.tsx
@@ -1,6 +1,23 @@
import InputMask from "@mona-health/react-input-mask";
import clsx from "clsx";
import { useState } from "react";
+import ChevronDownIcon from "../components/icons/ChevronDownIcon";
+import Button from "./Button";
+import { useClickAway } from "@uidotdev/usehooks";
+
+interface CountryCode {
+ code: string;
+ mask: string;
+ flag: string;
+}
+
+const COUNTRY_CODES: CountryCode[] = [
+ { code: "+974", mask: "9999 9999", flag: "🇶🇦" },
+ { code: "+971", mask: "99 999 9999", flag: "🇦🇪" },
+ { code: "+1", mask: "999 999 99 99", flag: "🇺🇸" },
+ { code: "+44", mask: "9999 999999", flag: "🇬🇧" },
+ { code: "+7", mask: "999 999 99 99", flag: "🇷🇺" },
+];
interface InputProps extends React.InputHTMLAttributes
{
label: string;
@@ -19,12 +36,20 @@ function Input({
mask,
isTextArea = false,
maxLength,
+ type,
...props
}: InputProps) {
const [textValue, setTextValue] = useState("");
+ const [selectedCountry, setSelectedCountry] = useState(0);
+ const [isDropdownOpen, setIsDropdownOpen] = useState(false);
+
+ const ref = useClickAway(() => setIsDropdownOpen(false));
+
+ const isPhoneInput = type === "tel";
+ const currentMask = isPhoneInput ? COUNTRY_CODES[selectedCountry].mask : mask;
return (
-
+
@@ -48,14 +73,68 @@ function Input({
)}
- ) : (
-
-
+
+
+ {isDropdownOpen && (
+
+ {COUNTRY_CODES.map((country, index) => (
+
+ ))}
+
+ )}
+
+
+
+ ) : (
+
+