Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Homepage] <IoHomePreFooter /> component #13182

Merged
merged 7 commits into from
Nov 17, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
adds interfaces
  • Loading branch information
alexcarpenter committed Nov 17, 2021
commit 4d6c748fb08685fca0dde2e145613269507ae920
34 changes: 30 additions & 4 deletions website/components/io-home-pre-footer/index.tsx
Original file line number Diff line number Diff line change
@@ -2,7 +2,19 @@ import * as React from 'react'
import { IconArrowRight16 } from '@hashicorp/flight-icons/svg-react/arrow-right-16'
import s from './style.module.css'

export default function IoHomePreFooter({ brand, heading, description, ctas }) {
interface IoHomePreFooterProps {
brand: string
heading: string
description: string
ctas: [IoHomePreFooterCard, IoHomePreFooterCard, IoHomePreFooterCard]
}

export default function IoHomePreFooter({
brand,
heading,
description,
ctas,
}: IoHomePreFooterProps) {
return (
<div className={s.preFooter}>
<div className={s.container}>
@@ -19,7 +31,7 @@ export default function IoHomePreFooter({ brand, heading, description, ctas }) {
link={cta.link}
heading={cta.heading}
description={cta.description}
cta={cta.label}
label={cta.label}
/>
)
})}
@@ -29,7 +41,21 @@ export default function IoHomePreFooter({ brand, heading, description, ctas }) {
)
}

function IoHomePreFooterCard({ brand, link, heading, description, cta }) {
interface IoHomePreFooterCard {
brand?: string
link: string
heading: string
description: string
label: string
}

function IoHomePreFooterCard({
brand,
link,
heading,
description,
label,
}: IoHomePreFooterCard) {
return (
<a
href={link}
@@ -44,7 +70,7 @@ function IoHomePreFooterCard({ brand, link, heading, description, cta }) {
<h3 className={s.cardHeading}>{heading}</h3>
<p className={s.cardDescription}>{description}</p>
<span className={s.cardCta}>
{cta} <IconArrowRight16 />
{label} <IconArrowRight16 />
</span>
</a>
)