Skip to content

Commit 5967b0a

Browse files
Issue @deprecated notice for the UnderlineNav v1 (#2834)
* Issue @deprecate notice for the UnderlineNav v1 * Add changeset * Update src/UnderlineNav.tsx Co-authored-by: Josh Black <joshblack@github.com> * Add deprecation notice on the docs --------- Co-authored-by: Josh Black <joshblack@github.com>
1 parent 8bce974 commit 5967b0a

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

.changeset/dull-lies-count.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react': minor
3+
---
4+
5+
Issue a deprecation notice for UnderlineNav v1

docs/content/UnderlineNav.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ import data from '../../src/UnderlineNav.docs.json'
88

99
Use the UnderlineNav component to style navigation with a minimal underlined selected state, typically used for navigation placed at the top of the page.
1010

11+
## Deprecation
12+
13+
UnderlineNav is deprecated and will be replaced by the draft `UnderlineNav` in the next major release. See [the draft UnderlineNav's docs](/drafts/UnderlineNav2) for more details.
14+
1115
To use UnderlineNav with [react-router](https://github.com/ReactTraining/react-router) or
1216
[react-router-dom](https://www.npmjs.com/package/react-router-dom), pass
1317
`as={NavLink}` and omit the `selected` prop.

src/UnderlineNav.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,7 @@ const UnderlineNavLink = styled.a.attrs<StyledUnderlineNavLinkProps>(props => ({
111111
UnderlineNavLink.displayName = 'UnderlineNav.Link'
112112

113113
export type UnderlineNavLinkProps = ComponentProps<typeof UnderlineNavLink>
114+
/**
115+
* @deprecated UnderlineNav is deprecated and will be replaced by the draft `UnderlineNav` in the next major release. See https://primer.style/react/drafts/UnderlineNav2 for more details.
116+
*/
114117
export default Object.assign(UnderlineNav, {Link: UnderlineNavLink})

0 commit comments

Comments
 (0)