-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(components): post-language-switch web component (#4044)
Co-authored-by: Philipp Gfeller <[email protected]>
- Loading branch information
Showing
34 changed files
with
662 additions
and
106 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,6 @@ | ||
--- | ||
'@swisspost/design-system-documentation': minor | ||
'@swisspost/design-system-components': minor | ||
--- | ||
|
||
Added the `post-language-switch` component that enables users to change the language of a page. |
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
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
40 changes: 40 additions & 0 deletions
40
packages/components/src/components/post-language-switch/post-language-switch.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,40 @@ | ||
@use '@swisspost/design-system-styles/tokens/components'; | ||
@use '@swisspost/design-system-styles/functions/tokens'; | ||
@use '@swisspost/design-system-styles/mixins/button' as button-mx; | ||
@use '@swisspost/design-system-styles/mixins/utilities' as utilities-mx; | ||
|
||
tokens.$default-map: components.$post-button; | ||
|
||
:host { | ||
display: block; | ||
} | ||
|
||
.post-language-switch-dropdown-container { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
.post-language-switch-trigger { | ||
cursor: pointer; | ||
display: inline-flex; | ||
align-items: center; | ||
justify-content: center; | ||
border-width: tokens.get('button-border-width'); | ||
border-radius: tokens.get('button-border-radius-round'); | ||
background-color: transparent; | ||
font-family: inherit; | ||
font-weight: tokens.get('button-label-font-weight'); | ||
@include button-mx.button-size(sm); | ||
|
||
&:disabled { | ||
border-style: tokens.get('button-border-style-disabled'); | ||
@include button-mx.button-variant-def('disabled', 'tertiary'); | ||
} | ||
|
||
@include utilities-mx.focus-style; | ||
@include button-mx.button-variant-def('enabled', 'tertiary'); | ||
|
||
@include utilities-mx.not-disabled-hover() { | ||
@include button-mx.button-variant-def('hover', 'tertiary'); | ||
} | ||
} |
Oops, something went wrong.