From fcc2f4704e39b0e69b377cc138f75027721dac22 Mon Sep 17 00:00:00 2001 From: Dawid Rycerz Date: Tue, 22 Jul 2025 15:08:37 +0300 Subject: Initial template --- src/components/widgets/Pricing.astro | 83 ++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 src/components/widgets/Pricing.astro (limited to 'src/components/widgets/Pricing.astro') diff --git a/src/components/widgets/Pricing.astro b/src/components/widgets/Pricing.astro new file mode 100644 index 0000000..3f20b74 --- /dev/null +++ b/src/components/widgets/Pricing.astro @@ -0,0 +1,83 @@ +--- +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 &&
+ )} +
+ )} +
+ )) + } +
+
+
-- cgit v1.2.3