import React from 'react'; import { motion } from 'framer-motion'; import { cn } from '@/utils/helpers'; interface TabsProps { tabs: Array<{ label: string; value: string; icon?: React.ReactNode; }>; value: string; onChange: (value: string) => void; className?: string; } const Tabs: React.FC = ({ tabs, value, onChange, className }) => { return (
{tabs.map((tab) => ( onChange(tab.value)} className={cn( 'px-4 py-2 rounded-md font-medium text-sm transition-all duration-200 flex items-center gap-2', value === tab.value ? 'text-white' : 'text-slate-400 hover:text-slate-200' )} whileHover={{ y: -1 }} whileTap={{ scale: 0.98 }} > {tab.icon && {tab.icon}} {tab.label} {value === tab.value && ( )} ))}
); }; export default Tabs;