Skip to content

Commit 558eaeb

Browse files
committed
Dashboard: Update NFT token details page styles, reduce chakra usage
1 parent 672f7d0 commit 558eaeb

File tree

4 files changed

+280
-261
lines changed

4 files changed

+280
-261
lines changed

apps/dashboard/src/@/components/ui/tabs.tsx

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { usePathname } from "next/navigation";
77
import { useCallback, useRef, useState } from "react";
88
import { ScrollShadow } from "./ScrollShadow/ScrollShadow";
99
import { Button } from "./button";
10+
import { ToolTipLabel } from "./tooltip";
1011

1112
export type TabLink = {
1213
name: string;
@@ -82,6 +83,7 @@ export function TabButtons(props: {
8283
isActive: boolean;
8384
isDisabled?: boolean;
8485
icon?: React.FC<{ className?: string }>;
86+
toolTip?: string;
8587
}[];
8688
tabClassName?: string;
8789
activeTabClassName?: string;
@@ -111,26 +113,31 @@ export function TabButtons(props: {
111113
>
112114
{props.tabs.map((tab, index) => {
113115
return (
114-
<Button
115-
// biome-ignore lint/suspicious/noArrayIndexKey: tabs don't change order, so index is stable
116-
key={index}
117-
variant="ghost"
118-
ref={tab.isActive ? activeTabRef : undefined}
119-
className={cn(
120-
"relative inline-flex h-auto items-center gap-1.5 rounded-lg px-2 font-medium text-sm hover:bg-accent lg:px-3 lg:text-base",
121-
!tab.isActive &&
122-
"text-muted-foreground hover:text-foreground",
123-
tab.isDisabled && "cursor-not-allowed opacity-50",
124-
props.tabClassName,
125-
tab.isActive && props.activeTabClassName,
126-
)}
127-
onClick={!tab.isDisabled ? tab.onClick : undefined}
116+
<ToolTipLabel
117+
key={typeof tab.name === "string" ? tab.name : index}
118+
label={tab.toolTip}
128119
>
129-
{tab.icon && (
130-
<tab.icon className={cn("size-6", props.tabIconClassName)} />
131-
)}
132-
{tab.name}
133-
</Button>
120+
<Button
121+
variant="ghost"
122+
ref={tab.isActive ? activeTabRef : undefined}
123+
className={cn(
124+
"relative inline-flex h-auto items-center gap-1.5 rounded-lg px-2 font-medium text-sm hover:bg-accent lg:px-3 lg:text-base",
125+
!tab.isActive &&
126+
"text-muted-foreground hover:text-foreground",
127+
tab.isDisabled && "cursor-not-allowed opacity-50",
128+
props.tabClassName,
129+
tab.isActive && props.activeTabClassName,
130+
)}
131+
onClick={!tab.isDisabled ? tab.onClick : undefined}
132+
>
133+
{tab.icon && (
134+
<tab.icon
135+
className={cn("size-6", props.tabIconClassName)}
136+
/>
137+
)}
138+
{tab.name}
139+
</Button>
140+
</ToolTipLabel>
134141
);
135142
})}
136143
</div>

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/metadata-header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const MetadataHeader: React.FC<MetadataHeaderProps> = ({
7575
) : (
7676
<div className="flex flex-col gap-3 lg:flex-row lg:items-center">
7777
{data?.name && (
78-
<h1 className="line-clamp-2 font-semibold text-2xl tracking-tight lg:text-3xl">
78+
<h1 className="line-clamp-2 font-bold text-2xl tracking-tight lg:text-3xl">
7979
{data.name}
8080
</h1>
8181
)}

0 commit comments

Comments
 (0)