Skip to content

Commit a4e7d04

Browse files
committed
adjust navbar toggle behavior
for some reason after adding the custom ToggleIcon component to the Navbar, the screen size that the navbar collapses at changed. It used to collapse at <992px, but changed to <1232px. changing the `expand` prop to `md` collapses the navbar at <1008px, which is closer to the original behavior. ref: https://react-bootstrap.github.io/docs/components/navbar#responsive-behaviors
1 parent 4ebd693 commit a4e7d04

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/compounds/Header/Header.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const Header = ({ auth, linkColor, logo, navLinks, userSession }) => {
88
const { src, alt } = logo
99

1010
return (
11-
<Navbar bg='primary' expand='lg'>
11+
<Navbar bg='primary' expand='md'>
1212
<Container>
1313
<Navbar.Brand className='w-50'>
1414
<Logo src={src} alt={alt} height={45} />
@@ -20,6 +20,8 @@ const Header = ({ auth, linkColor, logo, navLinks, userSession }) => {
2020
<Nav className='ms-auto'>
2121
{navLinks.map((nav) => (
2222
<Nav.Link
23+
// ref https://github.com/twbs/bootstrap/blob/v5.2.3/scss/helpers/_colored-links.scss
24+
// for how this className works
2325
className={`link-${linkColor}`}
2426
href={nav.path}
2527
key={`${nav.label}-nav-link`}

0 commit comments

Comments
 (0)