--- import { Icon } from 'astro-icon/components'; import Button from 'components/ui/Button.astro'; import Headline from 'components/ui/Headline.astro'; import WidgetWrapper from 'components/ui/WidgetWrapper.astro'; import type { Pricing as Props } from 'types'; const { title = '', subtitle = '', tagline = '', prices = [], id, isDark = false, classes = {}, bg = await Astro.slots.render('bg'), } = Astro.props; ---
{ prices && prices.map(({ title, subtitle, 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.href &&
)}
)}
)) }