-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat(web): Introduce NavigationAvatar subcomponent DS-1666
- Loading branch information
Showing
8 changed files
with
275 additions
and
27 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
42 changes: 42 additions & 0 deletions
42
packages/web/src/scss/components/Navigation/_NavigationAvatar.scss
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,42 @@ | ||
// 1. We want specific typography for nested items in the Navigation component. | ||
// 2. In the vertical Navigation component, the stripe is placed outside the NavigationAvatar element, | ||
// so we need to disable pointer events on it. | ||
// 3. We want the selected and expanded states to override the hover and active states. | ||
|
||
@use '../../tools/reset'; | ||
@use '../../tools/typography'; | ||
@use 'theme'; | ||
|
||
.NavigationAvatar:where(button) { | ||
@include reset.button(); | ||
} | ||
|
||
.NavigationAvatar { | ||
display: flex; | ||
gap: theme.$avatar-gap; | ||
align-items: center; | ||
padding-inline-start: theme.$avatar-padding-start; | ||
padding-inline-end: theme.$avatar-padding-end; | ||
padding-block: theme.$avatar-padding-y; | ||
color: theme.$avatar-color-state-default; | ||
border-radius: theme.$avatar-border-radius; | ||
background-color: theme.$avatar-background-color-state-default; | ||
|
||
@media (hover: hover) { | ||
&:hover { | ||
text-decoration: none; | ||
color: theme.$avatar-color-state-hover; | ||
background-color: theme.$avatar-background-color-state-hover; | ||
} | ||
} | ||
|
||
&:active { | ||
text-decoration: none; | ||
color: theme.$avatar-color-state-active; | ||
background-color: theme.$avatar-background-color-state-active; | ||
} | ||
} | ||
|
||
.NavigationAvatar--square { | ||
border-radius: theme.$avatar-border-radius-square; | ||
} |
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,3 +1,4 @@ | ||
@forward 'Navigation'; | ||
@forward 'NavigationAction'; | ||
@forward 'NavigationAvatar'; | ||
@forward 'NavigationItem'; |
Oops, something went wrong.