-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export new UnderlineNav in main and deprecate the other
- Loading branch information
1 parent
1266b10
commit 882d9f3
Showing
11 changed files
with
203 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@primer/react': major | ||
--- | ||
|
||
Promoto newly written UnderlineNav to the main bundle and deprecate the old UnderlineNav |
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
4 changes: 2 additions & 2 deletions
4
src/__tests__/UnderlineNav.test.tsx → ..._tests__/deprecated/UnderlineNav.test.tsx
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
2 changes: 1 addition & 1 deletion
2
src/__tests__/UnderlineNav.types.test.tsx → ...__/deprecated/UnderlineNav.types.test.tsx
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
4 changes: 2 additions & 2 deletions
4
src/__tests__/UnderlineNavLink.test.tsx → ...ts__/deprecated/UnderlineNavLink.test.tsx
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
File renamed without changes.
178 changes: 178 additions & 0 deletions
178
src/__tests__/deprecated/__snapshots__/UnderlineNavLink.test.tsx.snap
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,178 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`UnderlineNav.Link adds activeClassName={SELECTED_CLASS} when it gets a "to" prop 1`] = ` | ||
.c0 { | ||
padding: 16px 8px; | ||
margin-right: 16px; | ||
font-size: 14px; | ||
line-height: 1.5; | ||
color: #24292f; | ||
text-align: center; | ||
border-bottom: 2px solid transparent; | ||
-webkit-text-decoration: none; | ||
text-decoration: none; | ||
} | ||
.c0:hover, | ||
.c0:focus { | ||
color: #24292f; | ||
-webkit-text-decoration: none; | ||
text-decoration: none; | ||
border-bottom-color: rgba(175,184,193,0.2); | ||
-webkit-transition: border-bottom-color 0.2s ease; | ||
transition: border-bottom-color 0.2s ease; | ||
} | ||
.c0:hover .PRC-UnderlineNav-octicon, | ||
.c0:focus .PRC-UnderlineNav-octicon { | ||
color: #57606a; | ||
} | ||
.c0.PRC-selected { | ||
color: #24292f; | ||
border-bottom-color: #fd8c73; | ||
} | ||
.c0.PRC-selected .PRC-UnderlineNav-octicon { | ||
color: #24292f; | ||
} | ||
.c0:focus:not(:disabled) { | ||
box-shadow: none; | ||
outline: 2px solid #0969da; | ||
outline-offset: -8px; | ||
} | ||
.c0:focus:not(:disabled):not(:focus-visible) { | ||
outline: solid 1px transparent; | ||
} | ||
.c0:focus-visible:not(:disabled) { | ||
box-shadow: none; | ||
outline: 2px solid #0969da; | ||
outline-offset: -8px; | ||
} | ||
<div | ||
activeClassName="selected" | ||
className="c0 PRC-UnderlineNav-item" | ||
to="#" | ||
/> | ||
`; | ||
|
||
exports[`UnderlineNav.Link renders consistently 1`] = ` | ||
.c0 { | ||
padding: 16px 8px; | ||
margin-right: 16px; | ||
font-size: 14px; | ||
line-height: 1.5; | ||
color: #24292f; | ||
text-align: center; | ||
border-bottom: 2px solid transparent; | ||
-webkit-text-decoration: none; | ||
text-decoration: none; | ||
} | ||
.c0:hover, | ||
.c0:focus { | ||
color: #24292f; | ||
-webkit-text-decoration: none; | ||
text-decoration: none; | ||
border-bottom-color: rgba(175,184,193,0.2); | ||
-webkit-transition: border-bottom-color 0.2s ease; | ||
transition: border-bottom-color 0.2s ease; | ||
} | ||
.c0:hover .PRC-UnderlineNav-octicon, | ||
.c0:focus .PRC-UnderlineNav-octicon { | ||
color: #57606a; | ||
} | ||
.c0.PRC-selected { | ||
color: #24292f; | ||
border-bottom-color: #fd8c73; | ||
} | ||
.c0.PRC-selected .PRC-UnderlineNav-octicon { | ||
color: #24292f; | ||
} | ||
.c0:focus:not(:disabled) { | ||
box-shadow: none; | ||
outline: 2px solid #0969da; | ||
outline-offset: -8px; | ||
} | ||
.c0:focus:not(:disabled):not(:focus-visible) { | ||
outline: solid 1px transparent; | ||
} | ||
.c0:focus-visible:not(:disabled) { | ||
box-shadow: none; | ||
outline: 2px solid #0969da; | ||
outline-offset: -8px; | ||
} | ||
<a | ||
className="c0 PRC-UnderlineNav-item" | ||
/> | ||
`; | ||
|
||
exports[`UnderlineNav.Link respects the "selected" prop 1`] = ` | ||
.c0 { | ||
padding: 16px 8px; | ||
margin-right: 16px; | ||
font-size: 14px; | ||
line-height: 1.5; | ||
color: #24292f; | ||
text-align: center; | ||
border-bottom: 2px solid transparent; | ||
-webkit-text-decoration: none; | ||
text-decoration: none; | ||
} | ||
.c0:hover, | ||
.c0:focus { | ||
color: #24292f; | ||
-webkit-text-decoration: none; | ||
text-decoration: none; | ||
border-bottom-color: rgba(175,184,193,0.2); | ||
-webkit-transition: border-bottom-color 0.2s ease; | ||
transition: border-bottom-color 0.2s ease; | ||
} | ||
.c0:hover .PRC-UnderlineNav-octicon, | ||
.c0:focus .PRC-UnderlineNav-octicon { | ||
color: #57606a; | ||
} | ||
.c0.PRC-selected { | ||
color: #24292f; | ||
border-bottom-color: #fd8c73; | ||
} | ||
.c0.PRC-selected .PRC-UnderlineNav-octicon { | ||
color: #24292f; | ||
} | ||
.c0:focus:not(:disabled) { | ||
box-shadow: none; | ||
outline: 2px solid #0969da; | ||
outline-offset: -8px; | ||
} | ||
.c0:focus:not(:disabled):not(:focus-visible) { | ||
outline: solid 1px transparent; | ||
} | ||
.c0:focus-visible:not(:disabled) { | ||
box-shadow: none; | ||
outline: 2px solid #0969da; | ||
outline-offset: -8px; | ||
} | ||
<a | ||
className="c0 PRC-UnderlineNav-item PRC-selected" | ||
selected={true} | ||
/> | ||
`; |
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
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