website refactor
This commit is contained in:
27
apps/website/components/leagues/RulebookTabs.tsx
Normal file
27
apps/website/components/leagues/RulebookTabs.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
|
||||
import { TabNavigation } from '@/ui/TabNavigation';
|
||||
|
||||
export type RulebookSection = 'scoring' | 'conduct' | 'protests' | 'penalties';
|
||||
|
||||
interface RulebookTabsProps {
|
||||
activeSection: RulebookSection;
|
||||
onSectionChange: (section: RulebookSection) => void;
|
||||
}
|
||||
|
||||
export function RulebookTabs({ activeSection, onSectionChange }: RulebookTabsProps) {
|
||||
const sections = [
|
||||
{ id: 'scoring', label: 'Scoring' },
|
||||
{ id: 'conduct', label: 'Conduct' },
|
||||
{ id: 'protests', label: 'Protests' },
|
||||
{ id: 'penalties', label: 'Penalties' },
|
||||
];
|
||||
|
||||
return (
|
||||
<TabNavigation
|
||||
tabs={sections}
|
||||
activeTab={activeSection}
|
||||
onTabChange={(id) => onSectionChange(id as RulebookSection)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user