-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Breadcrumbs): Convert Breadcrumbs to css module behind feature f…
…lag (#5150) * Convert Breadcrumbs to css module behind feature flag * Create fair-wolves-attack.md * Update @primer/react version to minor * Change `ComponentPropsWithoutRef` to `ComponentPropsWithRef` * Lint fix * Use old styled.a for item * Update snapshot and type * Refactor BreadcrumbsItem component with generics * Remove ref * Unused import * Refactor BreadcrumbsItem to support polymorphic components and add tests for "as" prop * Remove test for 'as' prop in BreadcrumbsItem * Remove snapshot test for 'as' prop in BreadcrumbsItem
- Loading branch information
Showing
4 changed files
with
167 additions
and
53 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": minor | ||
--- | ||
|
||
Convert Breadcrumbs to css module behind feature flag |
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,60 @@ | ||
.BreadcrumbsBase { | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
|
||
.BreadcrumbsList { | ||
padding-left: 0; | ||
margin-top: 0; | ||
margin-bottom: 0; | ||
} | ||
|
||
.ItemWrapper { | ||
display: inline-block; | ||
font-size: var(--text-body-size-medium); | ||
white-space: nowrap; | ||
list-style: none; | ||
|
||
&::after { | ||
display: inline-block; | ||
height: 0.8em; | ||
/* stylelint-disable-next-line primer/spacing */ | ||
margin: 0 0.5em; | ||
font-size: var(--text-body-size-medium); | ||
content: ''; | ||
/* stylelint-disable-next-line primer/borders, primer/colors */ | ||
border-right: 0.1em solid var(--fgColor-muted); | ||
transform: rotate(15deg) translateY(0.0625em); | ||
} | ||
|
||
&:first-child { | ||
margin-left: 0; | ||
} | ||
|
||
&:last-child { | ||
&::after { | ||
content: none; | ||
} | ||
} | ||
} | ||
|
||
.Item { | ||
display: inline-block; | ||
font-size: var(--text-body-size-medium); | ||
color: var(--fgColor-link); | ||
text-decoration: none; | ||
|
||
&:hover, | ||
&:focus { | ||
text-decoration: underline; | ||
} | ||
} | ||
|
||
.ItemSelected { | ||
color: var(--fgColor-default); | ||
pointer-events: none; | ||
|
||
&:focus { | ||
text-decoration: none; | ||
} | ||
} |
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