mirror of
https://github.com/vercel/commerce.git
synced 2025-07-26 19:51:23 +00:00
api and hero
This commit is contained in:
@@ -16,8 +16,8 @@ const HeroModule:Module<Fields> = ({ module: {fields }}) => {
|
||||
<Hero
|
||||
headline={fields.title}
|
||||
description={fields.description}
|
||||
linkText={fields.cTA?.text}
|
||||
linkUrl={fields.cTA?.href}
|
||||
ctaText={fields.cTA?.text}
|
||||
ctaUrl={fields.cTA?.href}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
@@ -6,10 +6,13 @@ import Link from 'next/link'
|
||||
interface HeroProps {
|
||||
className?: string
|
||||
headline: string
|
||||
description: string
|
||||
description: string,
|
||||
ctaUrl:string,
|
||||
ctaText: string
|
||||
|
||||
}
|
||||
|
||||
const Hero: FC<HeroProps> = ({ headline, description }) => {
|
||||
const Hero: FC<HeroProps> = ({ headline, description, ctaUrl, ctaText }) => {
|
||||
return (
|
||||
<div className="bg-accent-9 border-b border-t border-accent-2">
|
||||
<Container>
|
||||
@@ -17,9 +20,9 @@ const Hero: FC<HeroProps> = ({ headline, description }) => {
|
||||
<h2 className={s.title}>{headline}</h2>
|
||||
<div className={s.description}>
|
||||
<p>{description}</p>
|
||||
<Link href="/">
|
||||
<Link href={ctaUrl}>
|
||||
<a className="flex items-center text-accent-0 pt-3 font-bold hover:underline cursor-pointer w-max-content">
|
||||
Read it here
|
||||
{ctaText}
|
||||
<ArrowRight width="20" heigh="20" className="ml-1" />
|
||||
</a>
|
||||
</Link>
|
||||
|
Reference in New Issue
Block a user