File size: 893 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { ReactNode } from 'react'

import { GradientButton } from '../Buttons/GradientButton'
import { Copy } from '../Text/Copy'
import { GradientHeader } from '../Text/GradientHeader'
import { Heading } from '../Text/Heading'
import { block, blockCopy } from './HomeBlockCopy.css'

interface HomeBlockCopyProps {
  subtitle: string
  title: string
  children: ReactNode
  cta?: {
    label: string
    href: string
  }
}

export const HomeBlockCopy = ({
  subtitle,
  title,
  children,
  cta,
}: HomeBlockCopyProps) => (
  <div className={block}>
    <GradientHeader tag="h2" fontStyle="XXS" weight="bold">
      {subtitle}
    </GradientHeader>
    <Heading tag="h3" fontStyle="XL">
      {title}
    </Heading>
    <Copy className={blockCopy} tag="div" fontStyle="S">
      {children}
    </Copy>
    {cta ? <GradientButton href={cta.href}>{cta.label}</GradientButton> : null}
  </div>
)