Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
design-system-lib
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
julkiset-sivut
design-system-lib
Commits
4c798b87
Commit
4c798b87
authored
4 years ago
by
druid
Browse files
Options
Downloads
Patches
Plain Diff
pointing to external link, arrow up right
parent
b9748fe0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/link-box/link-box.scss
+15
-8
15 additions, 8 deletions
src/components/link-box/link-box.scss
src/components/link-box/link-box.tsx
+9
-6
9 additions, 6 deletions
src/components/link-box/link-box.tsx
with
24 additions
and
14 deletions
src/components/link-box/link-box.scss
+
15
−
8
View file @
4c798b87
:host
{
background
:
var
(
--
grayscale-background-box
);
border
:
2px
solid
purple
;
//@todo remove before submitting
display
:
flex
;
margin-bottom
:
32px
;
margin-right
:
0
;
...
...
@@ -233,7 +232,6 @@
padding
:
0
12px
;
}
//@todo check title + description styles
&
__title
{
@include
font-size
(
18px
,
22px
);
@include
font-weight
(
$bold
);
...
...
@@ -308,13 +306,24 @@
}
}
.hy-link-box-link
{
.hy-icon-wrapper
{
background-color
:
var
(
--
brand-main-light
);
bottom
:
12px
;
overflow
:
hidden
;
position
:
absolute
;
right
:
-6px
;
z-index
:
10
;
&
__hover
{
background-color
:
var
(
--
brand-main
);
}
}
.hy-link-box-link
{
display
:
block
;
svg
{
background-color
:
var
(
--
brand-main-light
)
;
background-color
:
transparent
;
box-shadow
:
0
2px
8px
0
rgba
(
0
,
0
,
0
,
0
.05
);
fill
:
var
(
--
grayscale-white
);
height
:
32px
;
...
...
@@ -322,10 +331,8 @@
width
:
32px
;
}
&
__hover
{
svg
{
background-color
:
var
(
--
brand-main
);
}
&
__external
{
transform
:
rotate
(
-45deg
);
}
@include
breakpoint
(
$extrawide
)
{
...
...
This diff is collapsed.
Click to expand it.
src/components/link-box/link-box.tsx
+
9
−
6
View file @
4c798b87
...
...
@@ -71,13 +71,13 @@ export class LinkBox implements ComponentInterface {
manageHoverEffect
(
linkbox
,
hoverOn
=
true
)
{
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
)
{
(
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
{
(
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 {
`hy-link-box-link__
${
this
.
variant
}
`
,
`hy-link-box-link__
${
this
.
headerstyle
}
`
,
this
.
headerstyle
,
this
.
isExternal
?
'
hy-link-box-link__external
'
:
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 {
{
this
.
textDescription
&&
<
div
class
=
{
classDescription
}
>
{
this
.
textDescription
}
</
div
>
}
</
div
>
</
div
>
<
a
class
=
{
classLinkAttributes
}
href
=
{
this
.
url
}
target
=
{
target
}
aria-label
=
{
this
.
scLabel
}
tabindex
=
"-1"
>
<
hy
-
icon
icon
=
{
'
hy-icon-arrow-right
'
}
size
=
{
32
}
/>
</
a
>
<
span
class
=
{
'
hy-icon-wrapper
'
}
>
<
a
class
=
{
classLinkAttributes
}
href
=
{
this
.
url
}
target
=
{
target
}
aria-label
=
{
this
.
scLabel
}
tabindex
=
"-1"
>
<
hy
-
icon
icon
=
{
'
hy-icon-arrow-to-right
'
}
size
=
{
32
}
/>
</
a
>
</
span
>
</
article
>,
];
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment