-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b7d0b3
commit 55fd347
Showing
4 changed files
with
176 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { IconArrowRight16 } from '@hashicorp/flight-icons/svg-react/arrow-right-16' | ||
import s from './style.module.css' | ||
|
||
interface IoHomeFeatureProps { | ||
link: string | ||
// thumnail: string | ||
heading: string | ||
description: string | ||
} | ||
|
||
export default function IoHomeFeature({ | ||
link, | ||
// thumbnail, | ||
heading, | ||
description, | ||
}: IoHomeFeatureProps) { | ||
return ( | ||
<a href={link} className={s.feature}> | ||
<div className={s.featureMedia}> | ||
{/* <Image src={thumbnail} width={400} height={200} alt="" /> */} | ||
</div> | ||
<div className={s.featureContent}> | ||
<h3 className={s.featureHeading}>{heading}</h3> | ||
<p className={s.featureDescription}>{description}</p> | ||
<span className={s.featureCta} aria-hidden={true}> | ||
Learn more{' '} | ||
<span> | ||
<IconArrowRight16 /> | ||
</span> | ||
</span> | ||
</div> | ||
</a> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
.feature { | ||
display: flex; | ||
align-items: center; | ||
flex-direction: column; | ||
padding: 32px; | ||
gap: 24px 64px; | ||
border-radius: 6px; | ||
background-color: #f9f9fa; | ||
color: var(--black); | ||
box-shadow: 0 2px 3px rgba(101, 106, 118, 0.1), | ||
0 8px 16px -10px rgba(101, 106, 118, 0.2); | ||
transition: box-shadow ease-in-out 0.2s; | ||
|
||
@media (--medium-up) { | ||
flex-direction: row; | ||
} | ||
|
||
&:hover { | ||
box-shadow: 0 2px 3px rgba(101, 106, 118, 0.15), | ||
0 16px 16px -10px rgba(101, 106, 118, 0.2); | ||
} | ||
} | ||
|
||
.featureMedia { | ||
flex-shrink: 0; | ||
background-color: var(--gray-6); | ||
aspect-ratio: 4 / 2; | ||
width: 100%; | ||
border-radius: 6px; | ||
|
||
@media (--medium-up) { | ||
width: 300px; | ||
} | ||
|
||
@media (--large) { | ||
width: 400px; | ||
} | ||
} | ||
|
||
.featureHeading { | ||
margin: 0; | ||
composes: g-type-display-4 from global; | ||
} | ||
|
||
.featureDescription { | ||
margin: 8px 0 24px; | ||
composes: g-type-body-small from global; | ||
color: var(--gray-3); | ||
} | ||
|
||
.featureCta { | ||
display: inline-flex; | ||
align-items: center; | ||
|
||
& > span { | ||
display: flex; | ||
margin-left: 12px; | ||
|
||
& > svg { | ||
transition: transform 0.2s; | ||
} | ||
} | ||
|
||
@nest .feature:hover & span svg { | ||
transform: translateX(2px); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters