mirror of https://github.com/hashicorp/consul
Brandon Romano
4 years ago
8 changed files with 136 additions and 5 deletions
@ -0,0 +1,28 @@
|
||||
import Button from '@hashicorp/react-button' |
||||
|
||||
export default function CloudOfferingsList({ offerings }) { |
||||
return ( |
||||
<ul className="g-cloud-offerings-list"> |
||||
{offerings.map(offering => ( |
||||
<li key={offering.title}> |
||||
<a |
||||
href={offering.link.url} |
||||
rel={offering.link.type === 'outbound' ? 'noopener' : undefined} |
||||
target={offering.link.type === 'outbound' ? '_blank' : undefined} |
||||
> |
||||
<img src={offering.image} alt={offering.title}/> |
||||
<span className="g-type-label-strong">{offering.eyebrow}</span> |
||||
<h4>{offering.title}</h4> |
||||
<p>{offering.description}</p> |
||||
<Button |
||||
title={offering.link.text} |
||||
linkType={offering.link.type} |
||||
theme={{ variant: 'tertiary' }} |
||||
url={offering.link.url} |
||||
/> |
||||
</a> |
||||
</li> |
||||
))} |
||||
</ul> |
||||
) |
||||
} |
@ -0,0 +1,57 @@
|
||||
ul.g-cloud-offerings-list { |
||||
list-style: none; |
||||
padding: 0; |
||||
margin: -16px; |
||||
display: flex; |
||||
|
||||
@media (width < 769px) { |
||||
flex-direction: column; |
||||
} |
||||
|
||||
& li { |
||||
flex-grow: 1; |
||||
margin: 16px; |
||||
background: var(--white); |
||||
border: 1px solid var(--gray-6); |
||||
border-radius: 2px; |
||||
text-align: center; |
||||
transition: box-shadow 0.25s, transform 0.25s, -webkit-transform 0.25s; |
||||
|
||||
&:hover { |
||||
box-shadow: 0 16px 28px rgba(37, 38, 45, 0.12); |
||||
transform: translateY(-4px); |
||||
cursor: pointer; |
||||
} |
||||
|
||||
& > a { |
||||
display: block; |
||||
padding: 32px; |
||||
color: inherit; |
||||
|
||||
& > img { |
||||
display: block; |
||||
width: 400px; |
||||
max-width: 100%; |
||||
margin-left: auto; |
||||
margin-right: auto; |
||||
margin-bottom: 14px; |
||||
} |
||||
|
||||
& > span { |
||||
color: var(--gray-4); |
||||
} |
||||
|
||||
& > h4 { |
||||
text-decoration: none; |
||||
margin-top: 8px; |
||||
margin-bottom: 0; |
||||
} |
||||
|
||||
& > p { |
||||
font-size: 19px; |
||||
margin-top: 8px; |
||||
margin-bottom: 24px; |
||||
} |
||||
} |
||||
} |
||||
} |
After Width: | Height: | Size: 95 KiB |
After Width: | Height: | Size: 161 KiB |
Loading…
Reference in new issue