Skip to content

Commit

Permalink
Avoid swizzling from dropdown component
Browse files Browse the repository at this point in the history
  • Loading branch information
JessSaavedra committed Feb 20, 2024
1 parent 524858f commit 2cf45bc
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 94 deletions.
6 changes: 4 additions & 2 deletions docs/docusaurus/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@ module.exports = {
type: 'doc',
label: 'Home',
docId: 'gx_welcome',
position: 'right'
position: 'right',
className: 'home-section'
},
{
type: 'doc',
label: 'GX Cloud',
docId: 'cloud/gx_cloud_lp',
position: 'right'
position: 'right',
className: 'gx-cloud-section'
},
{
type: 'doc',
Expand Down
2 changes: 1 addition & 1 deletion docs/docusaurus/src/css/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
/* enlarge the sidebar width */
--doc-sidebar-width: 350px !important;

--ifm-navbar-height: 6rem;
--ifm-navbar-height: 5.75rem;

/* Colors */
--white: #fff;
Expand Down
12 changes: 12 additions & 0 deletions docs/docusaurus/src/css/navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
box-shadow: unset;
height: unset;
padding: 0;

&:has(.home-section.navbar__link--active),
&:has(.gx-cloud-section.navbar__link--active) {
.navbar__items .dropdown {
display: none;
}
}
}

.navbar__item {
Expand Down Expand Up @@ -86,6 +93,11 @@

.navbar__link--active {
border-bottom: 2px solid var(--ifm-color-primary);

&[href*="0.17"] {
border-bottom: none;
color: var(--ifm-navbar-link-color);
}
}

.header-cloud-link {
Expand Down

This file was deleted.

10 changes: 10 additions & 0 deletions docs/docusaurus/src/theme/NavbarItem/DropdownNavbarItem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import DropdownNavbarItem from '@theme-original/NavbarItem/DropdownNavbarItem';

export default function DropdownNavbarItemWrapper(props) {
return (
<>
<DropdownNavbarItem {...props} href={'#'} />
</>
);
}

0 comments on commit 2cf45bc

Please sign in to comment.