Skip to content

Commit

Permalink
remove swizzle config
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena committed May 16, 2022
1 parent 4d33da3 commit 686bf91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
7 changes: 0 additions & 7 deletions packages/docusaurus-theme-classic/src/getSwizzleConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,6 @@ export default function getSwizzleConfig(): SwizzleConfig {
description:
'The Navbar item components mapping. Can be ejected to add custom navbar item types. See https://github.com/facebook/docusaurus/issues/7227.',
},
// TODO should probably not even appear here
'NavbarItem/utils': {
actions: {
eject: 'forbidden',
wrap: 'forbidden',
},
},
NotFound: {
actions: {
eject: 'safe',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ import type {
Props,
} from '@theme/NavbarItem/DefaultNavbarItem';

/**
* On desktop and mobile, we would apply different class names for dropdown
* items.
* @see https://github.com/facebook/docusaurus/pull/5431
*/
const getInfimaActiveClassName = (
mobile?: boolean,
): `${'menu' | 'navbar'}__link--active` =>
mobile ? 'menu__link--active' : 'navbar__link--active';

function DefaultNavbarItemDesktop({
className,
isDropdownItem = false,
Expand Down Expand Up @@ -68,7 +58,8 @@ export default function DefaultNavbarItem({
<Comp
{...props}
activeClassName={
props.activeClassName ?? getInfimaActiveClassName(mobile)
props.activeClassName ??
(mobile ? 'menu__link--active' : 'navbar__link--active')
}
/>
);
Expand Down

0 comments on commit 686bf91

Please sign in to comment.