Skip to content
Snippets Groups Projects
Commit 2328d2db authored by druid's avatar druid
Browse files

menu language: disabled link styles

parent 36e9a903
No related branches found
No related tags found
No related merge requests found
...@@ -572,6 +572,7 @@ export namespace Components { ...@@ -572,6 +572,7 @@ export namespace Components {
interface HyMenuLanguageItem { interface HyMenuLanguageItem {
abbr: string; abbr: string;
isActive: boolean; isActive: boolean;
isDisabled: boolean;
isMobile: boolean; isMobile: boolean;
label: string; label: string;
langCode: string; langCode: string;
...@@ -1866,6 +1867,7 @@ declare namespace LocalJSX { ...@@ -1866,6 +1867,7 @@ declare namespace LocalJSX {
interface HyMenuLanguageItem { interface HyMenuLanguageItem {
abbr?: string; abbr?: string;
isActive?: boolean; isActive?: boolean;
isDisabled?: boolean;
isMobile?: boolean; isMobile?: boolean;
label?: string; label?: string;
langCode?: string; langCode?: string;
......
...@@ -18,7 +18,6 @@ a { ...@@ -18,7 +18,6 @@ a {
@include font-size(14px, 20px); @include font-size(14px, 20px);
@include font-weight($semibold); @include font-weight($semibold);
color: var(--brand-main-light); color: var(--brand-main-light);
font-weight: 700;
letter-spacing: -0.5px; letter-spacing: -0.5px;
padding: 8px 12px; padding: 8px 12px;
text-transform: none; text-transform: none;
...@@ -28,6 +27,7 @@ a { ...@@ -28,6 +27,7 @@ a {
color: var(--brand-main); color: var(--brand-main);
} }
} }
@include breakpoint($xlarge) { @include breakpoint($xlarge) {
@include font-size(16px, 20px); @include font-size(16px, 20px);
letter-spacing: -0.53px; letter-spacing: -0.53px;
...@@ -46,14 +46,25 @@ a { ...@@ -46,14 +46,25 @@ a {
.hy-menu-language-item__label { .hy-menu-language-item__label {
color: var(--grayscale-black); color: var(--grayscale-black);
font-weight: 700;
border-bottom: 2px solid var(--additional-orange); border-bottom: 2px solid var(--additional-orange);
@include breakpoint($wide) { @include breakpoint($wide) {
border: none; border: none;
} }
} }
} }
&.is-disabled {
@include breakpoint($wide) {
color: var(--link-disabled);
&:hover {
background-color: transparent;
color: var(--link-disabled);
}
}
}
&:not(.is-mobile) { &:not(.is-mobile) {
margin: 0; margin: 0;
} }
......
...@@ -8,6 +8,7 @@ import {Component, h, Prop, Host} from '@stencil/core'; ...@@ -8,6 +8,7 @@ import {Component, h, Prop, Host} from '@stencil/core';
export class SiteLanguage { export class SiteLanguage {
@Prop() abbr: string; @Prop() abbr: string;
@Prop() isActive: boolean = false; @Prop() isActive: boolean = false;
@Prop() isDisabled: boolean = false;
@Prop() isMobile: boolean = false; @Prop() isMobile: boolean = false;
@Prop() label: string; @Prop() label: string;
@Prop() langCode: string; @Prop() langCode: string;
...@@ -18,6 +19,7 @@ export class SiteLanguage { ...@@ -18,6 +19,7 @@ export class SiteLanguage {
<Host <Host
class={{ class={{
'is-active': this.isActive, 'is-active': this.isActive,
'is-disabled': this.isDisabled,
'hy-menu-language-item': true, 'hy-menu-language-item': true,
}} }}
> >
...@@ -25,6 +27,7 @@ export class SiteLanguage { ...@@ -25,6 +27,7 @@ export class SiteLanguage {
href={this.url} href={this.url}
class={{ class={{
'is-active': this.isActive, 'is-active': this.isActive,
'is-disabled': this.isDisabled,
'is-mobile': this.isMobile, 'is-mobile': this.isMobile,
}} }}
> >
......
...@@ -4,14 +4,15 @@ ...@@ -4,14 +4,15 @@
## Properties ## Properties
| Property | Attribute | Description | Type | Default | | Property | Attribute | Description | Type | Default |
| ---------- | ----------- | ----------- | --------- | ----------- | | ------------ | ------------- | ----------- | --------- | ----------- |
| `abbr` | `abbr` | | `string` | `undefined` | | `abbr` | `abbr` | | `string` | `undefined` |
| `isActive` | `is-active` | | `boolean` | `false` | | `isActive` | `is-active` | | `boolean` | `false` |
| `isMobile` | `is-mobile` | | `boolean` | `false` | | `isDisabled` | `is-disabled` | | `boolean` | `false` |
| `label` | `label` | | `string` | `undefined` | | `isMobile` | `is-mobile` | | `boolean` | `false` |
| `langCode` | `lang-code` | | `string` | `undefined` | | `label` | `label` | | `string` | `undefined` |
| `url` | `url` | | `string` | `undefined` | | `langCode` | `lang-code` | | `string` | `undefined` |
| `url` | `url` | | `string` | `undefined` |
## Dependencies ## Dependencies
......
...@@ -6,6 +6,7 @@ export interface MenuLanguage { ...@@ -6,6 +6,7 @@ export interface MenuLanguage {
abbr: string; abbr: string;
label: string; label: string;
isActive?: boolean; isActive?: boolean;
isDisabled?: boolean;
} }
import {Component, h, Prop, Host, Watch, Element, Listen, State, Event, EventEmitter} from '@stencil/core'; import {Component, h, Prop, Host, Watch, Element, Listen, State, Event, EventEmitter} from '@stencil/core';
...@@ -101,6 +102,7 @@ export class MenuLanguage { ...@@ -101,6 +102,7 @@ export class MenuLanguage {
label={item.label} label={item.label}
abbr={item.abbr} abbr={item.abbr}
is-active={item.isActive} is-active={item.isActive}
is-disabled={item.isDisabled}
is-mobile={this.isMobile} is-mobile={this.isMobile}
/> />
); );
...@@ -144,6 +146,7 @@ export class MenuLanguage { ...@@ -144,6 +146,7 @@ export class MenuLanguage {
label={item.label} label={item.label}
abbr={item.abbr} abbr={item.abbr}
is-active={item.isActive} is-active={item.isActive}
is-disabled={item.isDisabled}
is-mobile={this.isMobile} is-mobile={this.isMobile}
/> />
); );
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
--brand-main-dark: #003146; --brand-main-dark: #003146;
--brand-main-nearly-black: #000222; --brand-main-nearly-black: #000222;
--link-blue: #0479a5; --link-blue: #0479a5;
--link-disabled: #767676;
--grayscale-white: #fff; --grayscale-white: #fff;
--grayscale-light: #f8f8f8; --grayscale-light: #f8f8f8;
--grayscale-medium: #d2d2d2; --grayscale-medium: #d2d2d2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment