Skip to content

Commit

Permalink
fix(v2): render as regular text uncollapsible categories (#2880)
Browse files Browse the repository at this point in the history
  • Loading branch information
lex111 authored Jun 4, 2020
1 parent 953abd8 commit 6f2e59a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ function DocSidebarItemCategory({
const handleItemClick = useCallback(
(e) => {
e.preventDefault();
e.target.blur();
setCollapsed((state) => !state);
},
[setCollapsed],
Expand All @@ -91,9 +90,10 @@ function DocSidebarItemCategory({
className={classnames('menu__link', {
'menu__link--sublist': collapsible,
'menu__link--active': collapsible && isActive,
[styles.menuLinkText]: !collapsible,
})}
href="#!"
onClick={collapsible ? handleItemClick : undefined}
href={collapsible ? '#!' : undefined}
{...props}>
{label}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@
padding: 0.5rem;
}

.menuLinkText {
cursor: initial;
}

.menuLinkText:hover {
background: none;
}

.menuWithAnnouncementBar {
margin-bottom: var(--docusaurus-announcement-bar-height);
}
Expand Down

0 comments on commit 6f2e59a

Please sign in to comment.