Skip to content

Commit

Permalink
fix: card link hover and let right position switch
Browse files Browse the repository at this point in the history
  • Loading branch information
melniiv committed Jun 19, 2024
1 parent 3877900 commit a55183e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-helsinki-headless-cms",
"version": "1.0.0-alpha283",
"version": "1.0.0-alpha284",
"description": "React components for displaying Headless CMS content according to guidelines set by HDS",
"main": "cjs/index.js",
"module": "index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/core/card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ export function Card({
isCentered && styles.isCentered,
)}
style={style}
onMouseEnter={handleToggleActive}
onMouseLeave={handleToggleActive}
onMouseEnter={url && handleToggleActive}
onMouseLeave={url && handleToggleActive}
>
<BackgroundImage
id={id}
Expand Down
18 changes: 9 additions & 9 deletions src/core/card/card.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

&.responsive {
flex-direction: row;
&.image-right {
&.image-left {
flex-direction: row-reverse;
}
}
Expand All @@ -47,14 +47,14 @@
flex-direction: row-reverse;
}

&.image-right {
&.image-left {
flex-direction: row-reverse;
&.isCentered,
&.isDelimited {
flex-direction: row;
}
}
&.image-left {
&.image-right {
flex-direction: row;
&.isCentered,
&.isDelimited {
Expand Down Expand Up @@ -112,7 +112,7 @@
margin-bottom: 0;
&.responsive {
flex-direction: column;
&.image-right {
&.image-left {
flex-direction: column;
&.isCentered,
&.isDelimited {
Expand All @@ -132,7 +132,7 @@
flex-direction: row-reverse;
}

&.image-right {
&.image-left {
flex-direction: row-reverse;
&.isCentered,
&.isDelimited {
Expand Down Expand Up @@ -230,18 +230,18 @@
&.isDelimited {
@include respond_above(s) {
width: 62.5%;
&.left {
&.right {
margin-right: 37.5%;
}
&.right {
&.left {
margin-left: 37.5%;
}
@include respond_above(l) {
width: 80%;
&.left {
&.right {
margin-right: 20%;
}
&.right {
&.left {
margin-left: 20%;
}
}
Expand Down

0 comments on commit a55183e

Please sign in to comment.