Skip to content
Snippets Groups Projects
Commit 4c798b87 authored by druid's avatar druid
Browse files

pointing to external link, arrow up right

parent b9748fe0
No related branches found
No related tags found
No related merge requests found
:host { :host {
background: var(--grayscale-background-box); background: var(--grayscale-background-box);
border: 2px solid purple; //@todo remove before submitting
display: flex; display: flex;
margin-bottom: 32px; margin-bottom: 32px;
margin-right: 0; margin-right: 0;
...@@ -233,7 +232,6 @@ ...@@ -233,7 +232,6 @@
padding: 0 12px; padding: 0 12px;
} }
//@todo check title + description styles
&__title { &__title {
@include font-size(18px, 22px); @include font-size(18px, 22px);
@include font-weight($bold); @include font-weight($bold);
...@@ -308,13 +306,24 @@ ...@@ -308,13 +306,24 @@
} }
} }
.hy-link-box-link { .hy-icon-wrapper {
background-color: var(--brand-main-light);
bottom: 12px; bottom: 12px;
overflow: hidden;
position: absolute; position: absolute;
right: -6px; right: -6px;
z-index: 10;
&__hover {
background-color: var(--brand-main);
}
}
.hy-link-box-link {
display: block;
svg { svg {
background-color: var(--brand-main-light); background-color: transparent;
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.05); box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.05);
fill: var(--grayscale-white); fill: var(--grayscale-white);
height: 32px; height: 32px;
...@@ -322,10 +331,8 @@ ...@@ -322,10 +331,8 @@
width: 32px; width: 32px;
} }
&__hover { &__external {
svg { transform: rotate(-45deg);
background-color: var(--brand-main);
}
} }
@include breakpoint($extrawide) { @include breakpoint($extrawide) {
......
...@@ -71,13 +71,13 @@ export class LinkBox implements ComponentInterface { ...@@ -71,13 +71,13 @@ export class LinkBox implements ComponentInterface {
manageHoverEffect(linkbox, hoverOn = true) { manageHoverEffect(linkbox, hoverOn = true) {
let title = linkbox.shadowRoot.querySelector('h3.hy-link-box__text-container__title'); let title = linkbox.shadowRoot.querySelector('h3.hy-link-box__text-container__title');
let boxLink = linkbox.shadowRoot.querySelector('.hy-link-box-link'); let boxLink = linkbox.shadowRoot.querySelector('.hy-icon-wrapper');
if (hoverOn) { if (hoverOn) {
(title as HTMLElement).classList.add('hy-link-box__text-container__title__hover'); (title as HTMLElement).classList.add('hy-link-box__text-container__title__hover');
(boxLink as HTMLElement).classList.add('hy-link-box-link__hover'); (boxLink as HTMLElement).classList.add('hy-icon-wrapper__hover');
} else { } else {
(title as HTMLElement).classList.remove('hy-link-box__text-container__title__hover'); (title as HTMLElement).classList.remove('hy-link-box__text-container__title__hover');
(boxLink as HTMLElement).classList.remove('hy-link-box-link__hover'); (boxLink as HTMLElement).classList.remove('hy-icon-wrapper__hover');
} }
} }
...@@ -98,6 +98,7 @@ export class LinkBox implements ComponentInterface { ...@@ -98,6 +98,7 @@ export class LinkBox implements ComponentInterface {
`hy-link-box-link__${this.variant}`, `hy-link-box-link__${this.variant}`,
`hy-link-box-link__${this.headerstyle}`, `hy-link-box-link__${this.headerstyle}`,
this.headerstyle, this.headerstyle,
this.isExternal ? 'hy-link-box-link__external' : null,
].join(' '); ].join(' ');
const classTextContainer = ['hy-link-box__text-container', this.imageUrl ? 'hy-link-box--with-image' : null].join( const classTextContainer = ['hy-link-box__text-container', this.imageUrl ? 'hy-link-box--with-image' : null].join(
...@@ -140,9 +141,11 @@ export class LinkBox implements ComponentInterface { ...@@ -140,9 +141,11 @@ export class LinkBox implements ComponentInterface {
{this.textDescription && <div class={classDescription}>{this.textDescription}</div>} {this.textDescription && <div class={classDescription}>{this.textDescription}</div>}
</div> </div>
</div> </div>
<a class={classLinkAttributes} href={this.url} target={target} aria-label={this.scLabel} tabindex="-1"> <span class={'hy-icon-wrapper'}>
<hy-icon icon={'hy-icon-arrow-right'} size={32} /> <a class={classLinkAttributes} href={this.url} target={target} aria-label={this.scLabel} tabindex="-1">
</a> <hy-icon icon={'hy-icon-arrow-to-right'} size={32} />
</a>
</span>
</article>, </article>,
]; ];
} }
......
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