Skip to content

Commit 0aefcab

Browse files
committed
fix tabs header cutoff
1 parent 2f41bc9 commit 0aefcab

File tree

2 files changed

+23
-25
lines changed

2 files changed

+23
-25
lines changed

components/InternalTeam.jsx

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -53,32 +53,30 @@ const InternalTeam = () => {
5353
</Heading>
5454
<span className="text-5xl font-semibold">Team</span>
5555
</div>
56-
<div>
57-
{groups.length > 0 && (
58-
<Tabs value={activeTab}>
59-
<TabsHeader className="flex flex-row justify-center">
60-
{groups.map((group) => (
61-
<Tab key={group} value={group} onClick={() => setActiveTab(group)}>
62-
<div
63-
className={`rounded-full p-2 px-4 font-medium hover:bg-[#7559fc] hover:text-white transition-all duration-200
56+
{groups.length > 0 && (
57+
<Tabs value={activeTab} className="">
58+
<TabsHeader className="overflow-x-auto whitespace-nowrap scrollbar-hide w-full flex flex-row">
59+
{groups.map((group) => (
60+
<Tab key={group} value={group} onClick={() => setActiveTab(group)}>
61+
<div
62+
className={`rounded-full p-2 px-4 font-medium hover:bg-[#7559fc] hover:text-white transition-all duration-200
6463
${activeTab === group ? 'bg-[#7559fc] text-white' : 'text-black'}
6564
`}
66-
>
67-
{group}
68-
</div>
69-
</Tab>
70-
))}
71-
</TabsHeader>
72-
<TabsBody>
73-
{groups.map((group) => (
74-
<TabPanel key={group} value={group}>
75-
<Team executives={executives.filter((exec) => exec.group === group)} />
76-
</TabPanel>
77-
))}
78-
</TabsBody>
79-
</Tabs>
80-
)}
81-
</div>
65+
>
66+
{group}
67+
</div>
68+
</Tab>
69+
))}
70+
</TabsHeader>
71+
<TabsBody>
72+
{groups.map((group) => (
73+
<TabPanel key={group} value={group}>
74+
<Team executives={executives.filter((exec) => exec.group === group)} />
75+
</TabPanel>
76+
))}
77+
</TabsBody>
78+
</Tabs>
79+
)}
8280
</>
8381
);
8482
};

components/TechnicalTeam.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const TechnicalTeam = () => {
3535
</div>
3636
{positions.length > 0 && (
3737
<Tabs value={activeTab}>
38-
<TabsHeader className="flex flex-row justify-center">
38+
<TabsHeader className="overflow-x-auto whitespace-nowrap scrollbar-hide w-full flex flex-row">
3939
{positions.map((position) => (
4040
<Tab key={position} value={position} onClick={() => setActiveTab(position)}>
4141
<div

0 commit comments

Comments
 (0)