Skip to content

Commit 7a62414

Browse files
committed
refactor(Tabs): enhance TabList components with border and theme for consistency
1 parent 457db8d commit 7a62414

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

app/[locale]/dashboard/[entityType]/[entitySlug]/dataset/[id]/edit/components/EditLayout.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
'use client';
22

3+
import { ReactNode, useEffect, useState } from 'react';
4+
import { useParams, usePathname, useRouter } from 'next/navigation';
35
import { graphql } from '@/gql';
46
import { UpdateDatasetInput } from '@/gql/generated/graphql';
57
import { useMutation, useQuery } from '@tanstack/react-query';
6-
import { useParams, usePathname, useRouter } from 'next/navigation';
7-
import {
8-
Tab,
9-
TabList,
10-
Tabs,
11-
toast
12-
} from 'opub-ui';
13-
import { ReactNode, useEffect, useState } from 'react';
8+
import { Tab, TabList, Tabs, toast } from 'opub-ui';
149

1510
import { GraphQL } from '@/lib/api';
1611
import TitleBar from '../../../../components/title-bar';
@@ -227,9 +222,10 @@ const Navigation = ({
227222
return (
228223
<div>
229224
<Tabs value={selectedTab}>
230-
<TabList fitted>
225+
<TabList fitted border>
231226
{links.map((item, index) => (
232227
<Tab
228+
theme="dataSpace"
233229
value={item.id}
234230
key={index}
235231
onClick={() => handleTabClick(item)}

app/[locale]/dashboard/[entityType]/[entitySlug]/dataset/components/navigate-org-datasets.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ export const Navigation = ({
1818
return (
1919
<div>
2020
<Tabs defaultValue="drafts">
21-
<TabList fitted>
21+
<TabList fitted border>
2222
{options.map((item, index) => (
2323
<Tab
24+
theme="dataSpace"
2425
value={item.url}
2526
key={index}
2627
onClick={() => handleTabClick(item.url)}

app/[locale]/dashboard/[entityType]/[entitySlug]/usecases/edit/layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,10 @@ const TabsAndChildren = ({ children }: { children: React.ReactNode }) => {
116116
setStatus={setStatus}
117117
/>
118118
<Tabs defaultValue={initialTabLabel}>
119-
<TabList fitted>
119+
<TabList fitted border>
120120
{links.map((item, index) => (
121121
<Tab
122+
theme="dataSpace"
122123
value={item.label}
123124
key={index}
124125
onClick={() => handleTabClick(item.url)}

app/[locale]/dashboard/components/dashboard-header.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ export function DashboardHeader({ currentPath }: { currentPath: string }) {
4444
</Text>
4545
<div>
4646
<Tabs defaultValue={initialTabLabel}>
47-
<TabList fitted>
47+
<TabList fitted border>
4848
{userDashboardOptions
4949
.filter((item) => item !== null)
5050
.map((item, index) => (
5151
<Tab
52+
theme="dataSpace"
5253
value={item.label}
5354
key={index}
5455
onClick={() => handleTabClick(item.url)}

0 commit comments

Comments
 (0)