PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.13
Yatra – Travel Booking & Tour Operator Software v3.0.13
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
yatra / resources / js / components / trip-form / shared / SectionTabs.tsx

SectionTabs.tsx in Yatra – Travel Booking & Tour Operator Software 3.0.13, at resources/js/components/trip-form/shared/SectionTabs.tsx

46 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Section Tabs Component
3 * Reusable tab navigation for sections with multiple tabs
4 */
5
6 import React from "react";
7 import { __ } from "../../../lib/i18n";
8
9 export interface Tab {
10 id: string;
11 label: string;
12 }
13
14 interface SectionTabsProps {
15 tabs: Tab[];
16 activeTab: string;
17 onTabChange: (tabId: string) => void;
18 }
19
20 export const SectionTabs: React.FC<SectionTabsProps> = ({
21 tabs,
22 activeTab,
23 onTabChange,
24 }) => {
25 return (
26 <div className="border-b border-gray-200 dark:border-gray-700 mb-4">
27 <div className="flex gap-1">
28 {tabs.map((tab) => (
29 <button
30 key={tab.id}
31 type="button"
32 onClick={() => onTabChange(tab.id)}
33 className={`px-4 py-2 text-sm font-medium transition-colors ${
34 activeTab === tab.id
35 ? "border-b-2 border-blue-600 text-blue-600 dark:text-blue-400"
36 : "text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white"
37 }`}
38 >
39 {__(tab.label, tab.label)}
40 </button>
41 ))}
42 </div>
43 </div>
44 );
45 };
46