From 85a31139e7d11996da5de5d09ad3f821c60e232d Mon Sep 17 00:00:00 2001 From: Dawid Rycerz Date: Tue, 22 Jul 2025 16:00:35 +0300 Subject: Images --- src/components/widgets/Features2Custom.astro | 84 ++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 src/components/widgets/Features2Custom.astro (limited to 'src/components') diff --git a/src/components/widgets/Features2Custom.astro b/src/components/widgets/Features2Custom.astro new file mode 100644 index 0000000..18c1546 --- /dev/null +++ b/src/components/widgets/Features2Custom.astro @@ -0,0 +1,84 @@ +--- +import WidgetWrapper from '~/components/ui/WidgetWrapper.astro'; +import Headline from '~/components/ui/Headline.astro'; +import Button from '~/components/ui/Button.astro'; +import type { Features as Props } from '~/types'; +import { Icon } from 'astro-icon/components'; +import { twMerge } from 'tailwind-merge'; +import { readFileSync } from 'fs'; +import { join } from 'path'; + +const { + title = await Astro.slots.render('title'), + subtitle = await Astro.slots.render('subtitle'), + tagline = await Astro.slots.render('tagline'), + items = [], + columns = 3, + defaultIcon, + + id, + isDark = false, + classes = {}, + bg = await Astro.slots.render('bg'), +} = Astro.props; + +const { + container: containerClass = '', + panel: panelClass = '', + title: titleClass = '', + description: descriptionClass = '', + icon: defaultIconClass = 'text-primary', +} = classes as Record; +--- + + + } /> + + { + items && items.length > 0 && ( +
+ {items.map(({ title, description, icon, iconSvg, callToAction, classes: itemClasses = {} }) => ( +
+ {(icon || iconSvg || defaultIcon) && ( +
+ {iconSvg ? ( +
+ ) : ( + + )} +
+ )} +
{title}
+ {description && ( +

+ )} + {callToAction && ( +

+
+ )} +
+ ))} +
+ ) + } + \ No newline at end of file -- cgit v1.2.3