From 7643983d626a63897afe7020b9dbbecc331e6f83 Mon Sep 17 00:00:00 2001 From: prototypa Date: Wed, 16 Aug 2023 03:30:31 -0400 Subject: [PATCH] Create new HeroText widget --- src/components/widgets/HeroText.astro | 80 +++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 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..570869c --- /dev/null +++ b/src/components/widgets/HeroText.astro @@ -0,0 +1,80 @@ +--- +import { Icon } from 'astro-icon/components'; + +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' ? ( + + ) : ( + + {callToAction?.icon && ( + <> + + + )} + {callToAction?.text} + + )} +
+ ) + } + { + callToAction2 && ( +
+ {typeof callToAction2 === 'string' ? ( + + ) : ( + + {callToAction2?.icon && ( + <> + +   + + )} + {callToAction2.text} + + )} +
+ ) + } +
+
+ {content && } +

+
+
+