From c735556726e75428550a3d28a2cf58e2c8490b7d Mon Sep 17 00:00:00 2001 From: Dawid Rycerz Date: Mon, 21 Jul 2025 21:56:55 +0300 Subject: Initial template --- src/components/widgets/Stats.astro | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/components/widgets/Stats.astro (limited to 'src/components/widgets/Stats.astro') diff --git a/src/components/widgets/Stats.astro b/src/components/widgets/Stats.astro new file mode 100644 index 0000000..bf76ea0 --- /dev/null +++ b/src/components/widgets/Stats.astro @@ -0,0 +1,46 @@ +--- +import type { Stats as Props } from '~/types'; +import WidgetWrapper from '~/components/ui/WidgetWrapper.astro'; +import Headline from '~/components/ui/Headline.astro'; +import { Icon } from 'astro-icon/components'; + +const { + title = await Astro.slots.render('title'), + subtitle = await Astro.slots.render('subtitle'), + tagline, + stats = [], + + id, + isDark = false, + classes = {}, + bg = await Astro.slots.render('bg'), +} = Astro.props; +--- + + + +
+ { + stats && + stats.map(({ amount, title, icon }) => ( +
+ {icon && ( +
+ +
+ )} + {amount && ( +
+ {amount} +
+ )} + {title && ( +
+ {title} +
+ )} +
+ )) + } +
+
-- cgit v1.2.3