Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(www sidebar-nav): refine hover and disabled styles for nav item tags #5821

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions apps/www/components/sidebar-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,32 +50,32 @@ export function DocsSidebarNavItems({
<Link
key={index}
href={item.href}
className={cn(
"group flex w-full items-center px-2 py-1 font-normal text-foreground underline-offset-2 hover:underline",
item.disabled && "cursor-not-allowed opacity-60",
pathname === item.href && "underline"
)}
className="group flex w-full items-center px-2 py-1 font-normal text-foreground"
target={item.external ? "_blank" : ""}
rel={item.external ? "noreferrer" : ""}
>
{item.title}
<span
className={cn(
"underline-offset-2 group-hover:underline",
pathname === item.href && "underline"
)}
>
{item.title}
</span>
{item.label && (
<span className="ml-2 rounded-md bg-[#adfa1d] px-1.5 py-0.5 text-xs leading-none text-[#000000] no-underline group-hover:no-underline">
<span className="ml-2 rounded-md bg-[#adfa1d] px-1.5 py-0.5 text-xs leading-none text-[#000000]">
{item.label}
</span>
)}
</Link>
) : (
<span
key={index}
className={cn(
"flex w-full cursor-not-allowed items-center rounded-md p-2 text-muted-foreground hover:underline",
item.disabled && "cursor-not-allowed opacity-60"
)}
className="flex w-full cursor-not-allowed items-center rounded-md p-2 text-muted-foreground opacity-60"
>
{item.title}
{item.label && (
<span className="ml-2 rounded-md bg-muted px-1.5 py-0.5 text-xs leading-none text-muted-foreground no-underline group-hover:no-underline">
<span className="ml-2 rounded-md bg-muted px-1.5 py-0.5 text-xs leading-none text-muted-foreground">
{item.label}
</span>
)}
Expand Down