85 lines
3.5 KiB
TypeScript
85 lines
3.5 KiB
TypeScript
import React from 'react'
|
|
import { counterItems } from '@/constants'
|
|
// import patern from "../public/img/paternSvg.png"
|
|
|
|
// Import Swiper React components
|
|
import { Swiper, SwiperSlide } from 'swiper/react';
|
|
// Import Swiper styles
|
|
import 'swiper/css';
|
|
import 'swiper/css/pagination';
|
|
// import required modules
|
|
import { Pagination } from 'swiper/modules';
|
|
|
|
export default function Counter() {
|
|
return (
|
|
<div>
|
|
<div className="flex justify-center items-center w-full bg-blue bg-[url('../public/img/patern.svg')]"
|
|
>
|
|
<div className='3xl:w-[70%] w-[80%] flex flex-row py-24 gap-9 justify-between items-center
|
|
max-md:gap-4 max-lg:flex-wrap max-lg:justify-center'>
|
|
{counterItems.map((item) => {
|
|
return (
|
|
<div className='h-48 flex flex-col justify-end items-center gap-1 px-7 py-6 rounded-lg
|
|
hover:bg-[#002A5B] transition-all duration-500 text-center
|
|
max-md:px-1 max-md:py-1 max-lg:h-36 max-md:h-32'
|
|
key={item.id}>
|
|
<p className='text-yellow font-bold text-base'>{item.count}</p>
|
|
<p className='text-white font-normal text-sm'>{item.name}</p>
|
|
</div>
|
|
);
|
|
})}
|
|
{/*
|
|
<Swiper
|
|
slidesPerView={1}
|
|
// spaceBetween={30}
|
|
// spaceBetween={10}
|
|
// slidesPerView="auto"
|
|
breakpoints={{
|
|
1920: {
|
|
width: 1920,
|
|
slidesPerView: 5,
|
|
},
|
|
1024: {
|
|
width: 1024,
|
|
slidesPerView: 3,
|
|
},
|
|
768: {
|
|
width: 768,
|
|
slidesPerView: 2,
|
|
},
|
|
425: {
|
|
width: 425,
|
|
slidesPerView: 2,
|
|
},
|
|
}}
|
|
pagination={{
|
|
clickable: true,
|
|
}}
|
|
modules={[Pagination]}
|
|
className="mySwiper"
|
|
>
|
|
{counterItems.map((item) => {
|
|
return (
|
|
<SwiperSlide className='h-48 flex flex-col justify-end items-center gap-1 px-7 py-6 rounded-lg
|
|
hover:bg-[#002A5B] transition-all duration-500 text-center
|
|
max-md:px-1 max-md:py-1'
|
|
key={item.id}>
|
|
<p className='text-yellow font-bold text-base'>{item.count}</p>
|
|
<p className='text-white font-normal text-sm'>{item.name}</p>
|
|
</SwiperSlide>
|
|
);
|
|
})}
|
|
|
|
{/* <SwiperSlide>Slide 1</SwiperSlide> */}
|
|
|
|
{/* </Swiper> */}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|