website refactor

This commit is contained in:
2026-01-19 12:35:16 +01:00
parent a8731e6937
commit 15290400b3
122 changed files with 902 additions and 255 deletions

View File

@@ -1,21 +1,32 @@
import { Box } from './Box';
export interface TabOption {
id: string;
label: string;
icon?: React.ReactNode;
count?: number;
}
export interface BorderTabsProps {
tabs: TabOption[];
activeTabId: string;
activeTabId?: string;
onTabChange: (id: string) => void;
activeTab?: string;
}
export const BorderTabs = ({
tabs,
activeTabId,
onTabChange
onTabChange,
activeTab
}: BorderTabsProps) => {
const finalActiveTabId = activeTabId || activeTab || '';
return (
<Box display="flex" borderBottom>
{tabs.map((tab) => {
const isActive = tab.id === activeTabId;
const isActive = tab.id === finalActiveTabId;
return (
<button
key={tab.id}
@@ -29,6 +40,11 @@ export const BorderTabs = ({
<Box display="flex" alignItems="center" gap={2}>
{tab.icon}
{tab.label}
{tab.count !== undefined && (
<Box as="span" px={1.5} py={0.5} rounded="full" bg="white/10" fontSize="10px">
{tab.count}
</Box>
)}
</Box>
{isActive && (
<Box