Skip to content

Commit

Permalink
Make sure sidebar links provide their own hover colors
Browse files Browse the repository at this point in the history
  • Loading branch information
damianstasik committed Sep 19, 2023
1 parent e2a100b commit 19a5cd3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
12 changes: 5 additions & 7 deletions src/theme/DocSidebarItem/Category.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,11 @@ export default function DocSidebarItemCategory({
return (
<li>
<Link
className={clsx(
"flex justify-between items-center py-2 px-4 hover:text-gray-900 hover:dark:text-brand-600",
{
"bg-brand-500 dark:bg-brand-800 text-gray-900 dark:text-brand-600":
isActive,
}
)}
className={clsx("flex justify-between items-center py-2 px-4", {
"bg-brand-500 dark:bg-brand-800 text-gray-900 hover:text-gray-900 dark:text-brand-600 dark:hover:text-brand-600":
isActive,
"hover:text-gray-900 hover:dark:text-brand-600": !isActive,
})}
onClick={
collapsible
? (e) => {
Expand Down
12 changes: 5 additions & 7 deletions src/theme/DocSidebarItem/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ export default function DocSidebarItemLink({
return (
<li className={className} key={label}>
<Link
className={clsx(
"flex py-2 px-4 hover:text-gray-900 hover:dark:text-brand-600",
{
"bg-brand-500 dark:bg-brand-800 text-gray-900 dark:text-brand-600":
isActive,
}
)}
className={clsx("flex py-2 px-4 ", {
"bg-brand-500 dark:bg-brand-800 text-gray-900 hover:text-gray-900 dark:text-brand-600 dark:hover:text-brand-600":
isActive,
"hover:text-gray-900 hover:dark:text-brand-600": !isActive,
})}
autoAddBaseUrl={autoAddBaseUrl}
aria-current={isActive ? "page" : undefined}
to={href}
Expand Down

0 comments on commit 19a5cd3

Please sign in to comment.