Skip to content

Commit

Permalink
Fix: Added containerRef property on RouterNavbar component.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres D. Molins committed Jan 24, 2024
1 parent 90c0034 commit ee53626
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ dist
node_modules
storybook-static
.DS_Store
.vscode
.vscode
.idea
9 changes: 8 additions & 1 deletion src/components/modules/RouterNavbar/cmp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export const RouterNavbar = ({
Link,
children,
onToggle,
containerRef = document.body,
...rest
}: RouterNavbarProps) => {
const theme = useTheme()
Expand Down Expand Up @@ -178,7 +179,13 @@ export const RouterNavbar = ({
...rest,
}}
>
<NavbarLinkList withSlash collapsible="xl" breakpoint={breakpoint}>
<NavbarLinkList
withSlash
collapsible="xl"
breakpoint={breakpoint}
containerRef={containerRef}
cont
>
{routes.map((route) => (
<RouteMemo
key={route.href}
Expand Down
1 change: 1 addition & 0 deletions src/components/modules/RouterNavbar/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export type RouterNavbarProps = NavbarProps & {
breakpoint: BreakpointId
pathname: string
Link: LinkComponent
containerRef?: Element | DocumentFragment
children?: ReactNode
}

Expand Down

0 comments on commit ee53626

Please sign in to comment.