| 1 | import { ToolTip } from "../gui/Tooltip"; |
| 2 | |
| 3 | interface TabButtonProps { |
| 4 | label: string; |
| 5 | icon: React.ReactNode; |
| 6 | isActive: boolean; |
| 7 | onClick: () => void; |
| 8 | } |
| 9 | |
| 10 | export function TabButton({ label, icon, isActive, onClick }: TabButtonProps) { |
| 11 | return ( |
| 12 | <ToolTip content={label} place="right" className="text-xs md:!hidden"> |
| 13 | <div |
| 14 | className={`flex cursor-pointer items-center justify-center gap-1.5 rounded-md hover:brightness-125 md:justify-start ${ |
| 15 | isActive |
| 16 | ? "bg-vsc-input-background px-2 py-2" |
| 17 | : "text-description px-2 py-2" |
| 18 | }`} |
| 19 | onClick={onClick} |
| 20 | > |
| 21 | {icon} |
| 22 | <span className="text-description hidden md:inline">{label}</span> |
| 23 | </div> |
| 24 | </ToolTip> |
| 25 | ); |
| 26 | } |