From 4aeffb978c2f2c190a69adf0cf9d2d1216511a66 Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 27 Nov 2023 20:16:57 -0600 Subject: [PATCH] Allow header text to be customizable --- src/components/Header.astro | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/Header.astro b/src/components/Header.astro index f5560d4..141346f 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -1,13 +1,16 @@ --- interface Props { className?: string | null; + children?: string | null; } -const { className } = Astro.props; +const { className, children: propText } = Astro.props; +console.log(Astro.props); +const text = propText ?? "undefined behaviors"; ---
- undefined behaviors - undefined behaviors - undefined behaviors + {text} + {text} + {text}
\ No newline at end of file