I cant think of any other way to navigate this. I am using this hero component on every page which have a hero but I want to have custom styling to the tagline like I have done in the else case. Is there a better way to implement this?
---
interface Props {
title: string;
tagline: string;
align?: "start" | "center";
}
const { align = "center", title, tagline } = Astro.props;
---
<header class:list={["hero stack gap-4", align]}>
<div
class="prose mt-10 flex flex-col items-start space-y-5 md:mt-32 md:space-y-7 md:px-5 lg:mt-32">
<h1 class="py-0 my-0 text-black">{title}</h1>
{
tagline ? (
<p class="tracking-[0.4px] font-medium my-0 text-gray-500 leading-6">
{tagline}
</p>
) : (
<p class="tracking-[0.4px] font-medium my-0 text-gray-500 leading-6">
I create{" "}
<span class="font-semibold text-black">
polished, profitable and performant
</span>{" "}
websites that{" "}
<span class="font-semibold text-black">deliver robust ROI</span> for{" "}
<span class="font-semibold">
busines owners, startups, and ambitious individuals
</span>{" "}
seeking to{" "}
<span class="font-semibold text-black">
boost their online presence
</span>
.
</p>
)
}
</div>
<slot />
</header>```