-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
58 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { createContext } from 'react'; | ||
import { Link } from 'react-router-dom'; | ||
|
||
const BreadcrumbContext = createContext<typeof Link>(Link); | ||
|
||
export default BreadcrumbContext; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,29 @@ | ||
import React from 'react'; | ||
import NavContext from './NavContext'; | ||
import { NavLink } from 'react-router-dom'; | ||
import NavItem from './components/NavItem'; | ||
import { | ||
Nav as BootstrapNav, | ||
NavProps as BootstrapNavProps, | ||
} from 'react-bootstrap'; | ||
|
||
export interface NavProps extends BootstrapNavProps {} | ||
export interface NavProps extends BootstrapNavProps { | ||
navLink: typeof NavLink; | ||
} | ||
|
||
const Nav = ({ className, children, ...rest }: NavProps) => { | ||
const Nav = ({ navLink, className, children, ...rest }: NavProps) => { | ||
return ( | ||
<BootstrapNav | ||
navbar={false} | ||
variant="pills" | ||
className={`flex-column mb-auto mx-auto text-center main-nav ${className}`} | ||
className={`${className} flex-column mb-auto mx-auto text-center main-nav`} | ||
{...rest} | ||
> | ||
{children} | ||
<NavContext.Provider value={navLink}>{children}</NavContext.Provider> | ||
</BootstrapNav> | ||
); | ||
}; | ||
|
||
Nav.Item = NavItem; | ||
|
||
export default Nav; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters