import type { FC } from 'react' import cn from '@/utils/classnames' import style from './page.module.css' type Option = { value: string text: string icon?: React.ReactNode } type TabSliderProps = { className?: string value: string onChange: (v: string) => void options: Option[] } const TabSliderNew: FC = ({ className, value, onChange, options, }) => { return (
{options.map(option => (
onChange(option.value)} className={cn( 'mr-1 px-3 py-[7px] h-[32px] flex items-center rounded-lg border-[0.5px] border-transparent text-gray-700 text-[13px] font-medium leading-[18px] cursor-pointer hover:bg-gray-200', value === option.value &&style.tabcolor,'bg-white border-gray-200 shadow-xs hover:bg-white ', )} > {option.icon} {option.text}
))}
) } export default TabSliderNew