Skip to content

Commit

Permalink
Add DocSearch class to active NavItem heading
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-hiller committed Dec 8, 2023
1 parent e7643fb commit 8fefb8b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion website/src/components/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ const NavItem = component$<NavItemProps>(({ text, items }) => {
<li class="space-y-6">
<div class="sticky -top-1 z-10 lg:static">
<h4
class={clsx('text-lg font-medium text-slate-900 dark:text-slate-200')}
class={clsx(
'text-lg font-medium text-slate-900 dark:text-slate-200',
items?.some(({ href }) => location.url.pathname === href) &&
'docsearch-lvl1'
)}
>
{text}
</h4>
Expand Down

0 comments on commit 8fefb8b

Please sign in to comment.