import { type FC, type ReactNode } from 'react' import { clx } from '../helpers/utils' import { Swiper, SwiperSlide } from 'swiper/react' type Item = { icon: ReactNode, label: string, value: string, } type Props = { items: Item[], onChange: (value: string) => void, active: string, } const Tabs: FC = (props: Props) => { const SWIPER_SLIDE_STYLE = { overflow: 'visible !important', display: 'flex', } return ( { props.items.map((item: Item, index: number) => { return ( props.onChange(item.value)} key={item.value} className={clx( 'flex flex-col max-w-fit mt-[15px] items-center gap-2 cursor-pointer', index === 0 && 'pr-[30px]', // index === props.items.length - 1 && 'pl-[30px]', props.active === item.value && 'text-black' )}> {item.icon}
{item.label}
) }) }
) } export default Tabs