Skip to content

Commit 93898cd

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

File tree

4 files changed

+281
-261
lines changed

4 files changed

+281
-261
lines changed

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

Lines changed: 27 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,32 @@ 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}
119+
hoverable={tab.isDisabled}
128120
>
129-
{tab.icon && (
130-
<tab.icon className={cn("size-6", props.tabIconClassName)} />
131-
)}
132-
{tab.name}
133-
</Button>
121+
<Button
122+
variant="ghost"
123+
ref={tab.isActive ? activeTabRef : undefined}
124+
className={cn(
125+
"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",
126+
!tab.isActive &&
127+
"text-muted-foreground hover:text-foreground",
128+
tab.isDisabled && "cursor-not-allowed opacity-50",
129+
props.tabClassName,
130+
tab.isActive && props.activeTabClassName,
131+
)}
132+
onClick={!tab.isDisabled ? tab.onClick : undefined}
133+
>
134+
{tab.icon && (
135+
<tab.icon
136+
className={cn("size-6", props.tabIconClassName)}
137+
/>
138+
)}
139+
{tab.name}
140+
</Button>
141+
</ToolTipLabel>
134142
);
135143
})}
136144
</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)