ConceptPortal-public/rsconcept/frontend/src/components/Common/ConceptTab.tsx
2023-12-01 22:50:43 +03:00

26 lines
618 B
TypeScript

import type { TabProps } from 'react-tabs';
import { Tab } from 'react-tabs';
interface ConceptTabProps
extends Omit<TabProps, 'title' | 'children'> {
className?: string
tooltip?: string
label?: string
}
function ConceptTab({ label, tooltip, className, ...otherProps }: ConceptTabProps) {
return (
<Tab
className={`px-2 py-1 h-full min-w-[6rem] flex justify-center text-sm hover:cursor-pointer clr-tab whitespace-nowrap small-caps select-none font-semibold ${className}`}
title={tooltip}
{...otherProps}
>
{label}
</Tab>
);
}
ConceptTab.tabsRole = 'Tab';
export default ConceptTab;