diff --git a/docs/content/drafts/UnderlineNav2.mdx b/docs/content/drafts/UnderlineNav2.mdx index 2e0526acc05..50ec7349073 100644 --- a/docs/content/drafts/UnderlineNav2.mdx +++ b/docs/content/drafts/UnderlineNav2.mdx @@ -153,16 +153,23 @@ render() ### With React Router ```jsx -import {Link} from 'react-router-dom' +import {Link, useNavigate} from 'react-router-dom' import {UnderlineNav} from '@primer/react/drafts' const Navigation = () => { + const navigate = useNavigate() return ( Code - + { + navigate('issues') + }} + > Issues @@ -173,15 +180,24 @@ const Navigation = () => { } ``` + + You can bind the routing with both 'to' and 'onSelect' prop here. However; please note that if an 'href' prop is + passed, it will be ignored here. + + ## Props ### UnderlineNav + { ### UnderlineNav.Item +