You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
boundary/website/components/branded-cta/index.jsx

47 lines
1.4 KiB

import styles from './branded-cta.module.css'
import Button from '@hashicorp/react-button'
export default function BrandedCta({ heading, content, links }) {
return (
<div className={styles.brandedCta}>
<div className={`g-grid-container ${styles.contentContainer}`}>
<h2
data-testid="heading"
className={`g-type-display-2 ${styles.heading}`}
>
{heading}
</h2>
<div className="content-and-links">
<p
data-testid="content"
className={`g-type-body-large ${styles.content}`}
>
{content}
</p>
<div data-testid="links" className={styles.links}>
{links.map((link, stableIdx) => {
const buttonVariant = stableIdx === 0 ? 'primary' : 'secondary'
const linkType = link.type || ''
return (
<Button
// eslint-disable-next-line react/no-array-index-key
key={stableIdx}
linkType={linkType}
theme={{
variant: buttonVariant,
brand: 'boundary',
background: 'light',
}}
title={link.text}
url={link.url}
icon={link.icon}
/>
)
})}
</div>
</div>
</div>
</div>
)
}