Skip to content

Commit

Permalink
Merge pull request #333 from newrelic/jerel/guide-tile-hover
Browse files Browse the repository at this point in the history
Add hover state to guide tiles
  • Loading branch information
zstix authored Jun 29, 2020
2 parents bbce08e + 329da61 commit 28929db
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/components/GuideTile/GuideTile.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
border: 1px solid var(--color-neutrals-300);
border-radius: 0.25rem;
position: relative;
transition: all 0.15s ease-out;

&:hover {
transform: translateY(-2px);
border: 1px solid var(--color-neutrals-400);
}
}

.tileWithIcon h2 {
Expand Down
6 changes: 5 additions & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ const IndexPage = ({ data, pageContext }) => {
</header>
<GuideListing.List>
{getStartedGuides.map((guide, index) => (
<GuideTile key={index} {...guide}>
<GuideTile
key={index}
className={styles.featuredGuide}
{...guide}
>
<GuideTile.Button to={guide.path}>
Start the guide
</GuideTile.Button>
Expand Down
8 changes: 8 additions & 0 deletions src/pages/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

.guideListing {
--guide-list-row-height: auto;

margin-top: 0;
}

Expand Down Expand Up @@ -105,3 +106,10 @@
.allGuidesListing {
margin-top: 1rem;
}

.featuredGuide {
&:hover {
transform: unset;
border-color: var(--color-neutrals-300);
}
}

0 comments on commit 28929db

Please sign in to comment.