Sootzani/components/CallUs.tsx

111 lines
4.2 KiB
TypeScript

"use client";
import Image from "next/image";
import React from "react";
import mapImg from "../public/img/map.png";
import { callUsItems } from "@/constants";
import { cn } from "@/lib/utils";
// Map
// import { MapContainer } from "react-leaflet/MapContainer";
// import { TileLayer } from "react-leaflet/TileLayer";
// import { useMap } from "react-leaflet/hooks";
// import { Marker, Popup } from "leaflet";
// import { Map, TileLayer } from 'react-leaflet';
// import "leaflet/dist/leaflet.css";
// const defaultCenter = [38.9072, -77.0369];
// const defaultZoom = 8;
// const disneyWorldLatLng = [28.3852, -81.5639];
// const disneyLandLatLng = [33.8121, -117.919];
// src/components/Map.tsx
import { MapContainer, Marker, Popup, TileLayer, Tooltip } from "react-leaflet";
import "leaflet/dist/leaflet.css";
// import "leaflet-defaulticon-compatibility";
// import "leaflet-defaulticon-compatibility/dist/leaflet-defaulticon-compatibility.css";
export default function CallUs(props: any) {
const { position, zoom } = props;
return (
<div className="bg-white dark:bg-gray-900 w-screen">
<div className="w-full">
<div className="w-full h-[42vh]">
<Image
src={mapImg}
className="object-cover w-full h-full "
alt=" Logo1"
quality={100}
width={100}
height={100}
/>
{/* <MapContainer center={position} zoom={zoom} scrollWheelZoom={false}>
<TileLayer
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
<Marker position={position}>
<Popup>
A pretty CSS3 popup. <br /> Easily customizable.
</Popup>
</Marker>
</MapContainer> */}
{/* <MapContainer
center={[51.505, -0.09]}
zoom={13}
scrollWheelZoom={false}
>
<TileLayer
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
<Marker position={[51.505, -0.09]}>
<Popup>
A pretty CSS3 popup. <br /> Easily customizable.
</Popup>
</Marker>
</MapContainer> */}
</div>
<div className="container">
<div className="grid gap-8 md:gap-0 grid-cols-1 md:grid-cols-3 md:h-[40vh] h-full w-full lg:px-32 xl:px-52 md:py-8 py-12">
{callUsItems.map((item) => {
return (
<div
key={item.id}
className={cn(
" px-4 md:px-6 gap-4 flex justify-center items-center lg:border-l-[1px] border-black h-full",
item.id == 3 && " lg:border-l-0 backdrop:"
)}
>
<div
key={item.id}
className="p-4 lg:p-6 dark:bg-gray-800 gap-4 flex flex-col justify-between items-center
border-black max-md:rounded-lg h-full w-full lg:bg-transparent bg-[#EBEBEB]
rounded-lg hover:bg-[#EBEBEB] hover:shadow-[0px_4px_4px_0px_#00000026]
hover:transition-all transition-all delay-300 cursor-default"
>
<span className="inline-block text-orange-500 w-14 h-14">
{item.icon}
</span>
<p className=" text-center text-neutral-700 text-lg font-bold dark:text-white">
{item.title}
</p>
<p className="text-center text-neutral-500 text-base dark:text-gray-400 line-clamp-2">
{item.description}
</p>
<p className="text-center text-orange-500 text-lg font-bold">
{item.description2}
</p>
</div>
</div>
);
})}
</div>
</div>
</div>
</div>
);
}