2023-02-04 22:32:01 +00:00
|
|
|
import {ElementType, ReactNode} from 'react'
|
|
|
|
import {twMerge} from 'tailwind-merge'
|
|
|
|
|
2023-02-05 21:52:03 +00:00
|
|
|
type CtaProps = {
|
2023-02-04 22:32:01 +00:00
|
|
|
icon: ElementType
|
|
|
|
title: String
|
|
|
|
children: ReactNode
|
|
|
|
className?: string
|
|
|
|
}
|
|
|
|
|
2023-02-05 21:52:03 +00:00
|
|
|
export function Cta({icon: Icon, title, children, className}: CtaProps) {
|
2023-02-04 22:32:01 +00:00
|
|
|
return (
|
|
|
|
<div className={twMerge(`
|
|
|
|
rounded-2xl
|
|
|
|
border
|
|
|
|
border-zinc-100
|
|
|
|
p-6
|
|
|
|
dark:border-zinc-700/40
|
|
|
|
${className ?? ""}
|
|
|
|
`)}>
|
|
|
|
<h2 className="flex text-sm font-semibold text-zinc-900 dark:text-zinc-100">
|
|
|
|
<Icon className="h-6 w-6 flex-none"/>
|
|
|
|
<span className="ml-3">{title}</span>
|
|
|
|
</h2>
|
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|