-
+
{header}
{actions &&
{actions}
}
-
-
- {tabs.map((tab) => (
-
- {tab.label}
- {tab.badge !== undefined && tab.badge !== null && (
-
- {tab.badge}
-
- )}
-
- ))}
-
- {tabs.map((tab) => (
-
- {tab.content}
-
- ))}
-
+
);
}
diff --git a/src/components/shared/responsive-tabs.tsx b/src/components/shared/responsive-tabs.tsx
new file mode 100644
index 0000000..802e100
--- /dev/null
+++ b/src/components/shared/responsive-tabs.tsx
@@ -0,0 +1,77 @@
+'use client';
+
+import { type ReactNode } from 'react';
+
+import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
+import { Badge } from '@/components/ui/badge';
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from '@/components/ui/select';
+
+export interface ResponsiveTab {
+ id: string;
+ label: string;
+ content: ReactNode;
+ badge?: string | number;
+}
+
+interface ResponsiveTabsProps {
+ tabs: ResponsiveTab[];
+ value: string;
+ onValueChange: (value: string) => void;
+}
+
+/**
+ * Tabs that collapse to a native