38 lines
895 B
Plaintext
38 lines
895 B
Plaintext
---
|
|
interface Props {
|
|
label: string;
|
|
title: string;
|
|
subtitle?: string;
|
|
/** Left-aligned by default — centered headers are the exception now, not
|
|
* the rule, so sections don't all read as the same symmetrical block. */
|
|
center?: boolean;
|
|
light?: boolean;
|
|
}
|
|
|
|
const { label, title, subtitle, center = false, light = false } = Astro.props;
|
|
---
|
|
|
|
<div class:list={["reveal", center && "text-center"]}>
|
|
<span class:list={["section-label", light && "section-label-light", center && "justify-center"]}>{label}</span>
|
|
<h2
|
|
class:list={[
|
|
"mt-5 max-w-[18ch]",
|
|
center && "mx-auto max-w-[22ch]",
|
|
light ? "text-white" : "text-brand-ink",
|
|
]}
|
|
>
|
|
{title}
|
|
</h2>
|
|
{subtitle && (
|
|
<p
|
|
class:list={[
|
|
"mt-5 lede",
|
|
center && "mx-auto",
|
|
light ? "text-white/65" : "text-brand-text",
|
|
]}
|
|
>
|
|
{subtitle}
|
|
</p>
|
|
)}
|
|
</div>
|