2021-06-10 22:31:55 +00:00
|
|
|
import s from './style.module.css'
|
|
|
|
import Hero from '@hashicorp/react-hero'
|
|
|
|
|
|
|
|
export default function HomepageHero({
|
|
|
|
title,
|
|
|
|
description,
|
|
|
|
links,
|
|
|
|
uiVideo,
|
|
|
|
cliVideo,
|
|
|
|
alert,
|
|
|
|
image,
|
|
|
|
}) {
|
|
|
|
return (
|
|
|
|
<div className={s.consulHero}>
|
|
|
|
<Hero
|
|
|
|
data={{
|
|
|
|
product: 'consul',
|
|
|
|
alert: alert ? { ...alert, tagColor: 'consul-pink' } : null,
|
|
|
|
title: title,
|
|
|
|
description: description,
|
|
|
|
buttons: links,
|
|
|
|
backgroundTheme: 'light',
|
|
|
|
centered: false,
|
|
|
|
image: image ? { ...image } : null,
|
|
|
|
videos: [
|
|
|
|
...(uiVideo
|
|
|
|
? [
|
|
|
|
{
|
|
|
|
name: uiVideo.name ?? 'UI',
|
|
|
|
playbackRate: uiVideo.playbackRate,
|
2021-10-05 18:32:41 +00:00
|
|
|
aspectRatio: uiVideo.aspectRatio,
|
2021-06-10 22:31:55 +00:00
|
|
|
src: [
|
|
|
|
{
|
|
|
|
srcType: uiVideo.srcType,
|
|
|
|
url: uiVideo.url,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
]
|
|
|
|
: []),
|
|
|
|
...(cliVideo
|
|
|
|
? [
|
|
|
|
{
|
|
|
|
name: cliVideo.name ?? 'CLI',
|
|
|
|
playbackRate: cliVideo.playbackRate,
|
2021-10-05 18:32:41 +00:00
|
|
|
aspectRatio: cliVideo.aspectRatio,
|
2021-06-10 22:31:55 +00:00
|
|
|
src: [
|
|
|
|
{
|
|
|
|
srcType: cliVideo.srcType,
|
|
|
|
url: cliVideo.url,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
]
|
|
|
|
: []),
|
|
|
|
],
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|