-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: re-write website-switcher, add subheads
- Loading branch information
Showing
3 changed files
with
118 additions
and
49 deletions.
There are no files selected for viewing
34 changes: 0 additions & 34 deletions
34
packages/example/src/gatsby-theme-carbon/components/Switcher.js
This file was deleted.
Oops, something went wrong.
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
63 changes: 63 additions & 0 deletions
63
packages/gatsby-theme-carbon/src/components/Switcher/switcher.module.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,63 @@ | ||
@import '~carbon-components/scss/globals/scss/vars'; | ||
@import '~@carbon/elements/scss/type/type'; | ||
|
||
.nav { | ||
color: white; | ||
z-index: 10000; | ||
position: fixed; | ||
right: 0; | ||
top: 48px; | ||
height: 100%; | ||
padding: 1rem 0; | ||
width: 16rem; | ||
background-color: $carbon--gray-100; | ||
border-left: 1px solid $carbon--gray-80; | ||
transform: translateX(16rem); | ||
transition: transform $duration--moderate-01 $carbon--standard-easing; | ||
} | ||
|
||
.open { | ||
transform: translateX(0); | ||
box-shadow: -2px 2px 6px rgba(0, 0, 0, 0.2); | ||
} | ||
|
||
.divider { | ||
margin-top: 32px; | ||
margin-left: 1rem; | ||
color: $carbon--gray-70; | ||
padding-bottom: 4px; | ||
width: 100%; | ||
border-bottom: 1px solid $carbon--gray-70; | ||
padding-bottom: 4px; | ||
margin-bottom: 8px; | ||
} | ||
|
||
.divider span { | ||
@include carbon--type-style('caption-01'); | ||
color: $carbon--gray-30; | ||
} | ||
|
||
.link { | ||
padding: 6px 1rem; | ||
@include carbon--type-style('heading-01'); | ||
display: block; | ||
text-decoration: none; | ||
color: $carbon--gray-30; | ||
|
||
&:hover { | ||
background: #353535; | ||
color: $carbon--gray-10; | ||
} | ||
|
||
&:focus { | ||
outline: 2px solid $brand-01; | ||
outline-offset: -2px; | ||
} | ||
} | ||
|
||
.link--disabled { | ||
padding: 6px 1rem; | ||
@include carbon--type-style('heading-01'); | ||
display: block; | ||
color: $carbon--gray-60; | ||
} |