Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Updates for the Quicklinks component that were temporarily hotfixed in sculptured #209

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/components/quick-links/quick-links.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$bp-ql: 800px;

.quick-links {
margin-bottom: $spacing-s;
margin-bottom: $spacing-m;
margin-top: $spacing-s;
}

Expand All @@ -22,6 +22,14 @@ $bp-ql: 800px;
position: relative;
}


.quick-link.has-link:hover,
.quick-link.has-link:focus-within {
.quick-link__title {
text-decoration: underline;
}
}

.quick-link__image-wrapper {
align-self: center;
flex-shrink: 0;
Expand All @@ -34,3 +42,7 @@ $bp-ql: 800px;
max-height: 100%;
max-width: 100%;
}

.quick-links__description--bottom:not(:empty) {
margin-top: $spacing-xs;
}
8 changes: 6 additions & 2 deletions src/components/quick-links/quick-links.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ export default {

const quickLinkMarkUp = (link) => {
return html`
<div class="quick-link">
<div class="quick-link ${link && "has-link"}">
<a aria-hidden=true tabindex="-1" href="${link.url}" class="invisible-redundant-link"></a>
<div class="quick-link__image-wrapper">
<img class="quick-link__image" src="${link.image}" />
</div>
<div class="quick-link__text">
<h4>
<h4 class="quick-link__title">
<a href="${link.url}">
${link.title}
</a>
Expand All @@ -27,13 +27,17 @@ const quickLinkMarkUp = (link) => {
const QuickLinks = (args) => html`
<section class="productive-component quick-links">
<h2>${args.title}</h2>
<div class="quick-links__description">${args.description}</div>
<div class="quick-links__link-container">
${repeat((args.numberOfLinks), quickLinkMarkUp(args.link))}
</div>
<div class="quick-links__description--bottom">${args.descriptionBottom}</div>
</section>`;

QuickLinks.args = {
title: "Quick Links",
description: "Here are somelinks!",
descriptionBottom: "You can add some FAQ info here",
id: "quick-links",
numberOfLinks: 5,
link: {
Expand Down