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/HeroText.astro | 86 +++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 src/components/widgets/HeroText.astro (limited to 'src/components/widgets/HeroText.astro') diff --git a/src/components/widgets/HeroText.astro b/src/components/widgets/HeroText.astro new file mode 100644 index 0000000..be2a1b6 --- /dev/null +++ b/src/components/widgets/HeroText.astro @@ -0,0 +1,86 @@ +--- +import type { CallToAction } from '~/types'; +import Button from '~/components/ui/Button.astro'; + +export interface Props { + title?: string; + subtitle?: string; + tagline?: string; + content?: string; + callToAction?: string | CallToAction; + callToAction2?: string | CallToAction; +} + +const { + title = await Astro.slots.render('title'), + subtitle = await Astro.slots.render('subtitle'), + tagline, + content = await Astro.slots.render('content'), + callToAction = await Astro.slots.render('callToAction'), + callToAction2 = await Astro.slots.render('callToAction2'), +} = Astro.props; +--- + +
+ +
+
+
+
+ { + tagline && ( +

+ ) + } + { + title && ( +

+ ) + } +
+ { + subtitle && ( +

+ ) + } +

+ { + callToAction && ( +
+ {typeof callToAction === 'string' ? ( + + ) : ( +
+ ) + } + { + callToAction2 && ( +
+ {typeof callToAction2 === 'string' ? ( + + ) : ( +
+ ) + } +
+
+ {content && } +

+
+
+
-- cgit v1.2.3