--- import { Icon } from 'astro-icon/components'; import CTA from '~/components/ui/CTA.astro'; import Headline from '~/components/ui/Headline.astro'; import WidgetWrapper from '~/components/ui/WidgetWrapper.astro'; import type { Pricing } from '~/types'; const { title = '', subtitle = '', tagline = '', prices = [], id, isDark = false, classes = {}, bg = await Astro.slots.render('bg'), } = Astro.props as Pricing; ---
{ prices && prices.map(({ title, price, period, items, callToAction, hasRibbon = false, ribbonTitle }) => (
{price && period && (
{hasRibbon && ribbonTitle && (
{ribbonTitle}
)}
{title && (

{title}

)} {subtitle &&

{subtitle}

}
$ {price}
{period}
{items && (
    {items.map( ({ description, icon }) => description && (
  • {description}
  • ) )}
)}
{callToAction && (
{typeof callToAction === 'string' ? ( ) : ( callToAction && callToAction.text && callToAction.href && )}
)}
)}
)) }