fix: correct conditional header content styles

This commit is contained in:
Arvid Norlin
2024-04-24 10:47:09 +02:00
parent a6a909a631
commit 265f55ca9a
6 changed files with 57 additions and 25 deletions
@@ -1,6 +1,16 @@
.header {
display: grid;
gap: 0.5rem;
grid-template-areas: "title link";
grid-template-columns: 1fr max-content;
}
.title {
grid-area: title;
font-weight: 600;
}
.link {
grid-area: link;
}
.subtitle {
@@ -10,15 +10,17 @@ export default function Header({ title, subtitle, link }: HeaderProps) {
return (
<>
<header className={styles.header}>
<Title
as="h3"
level="h2"
className={styles.title}
weight="semiBold"
uppercase
>
{title}
</Title>
{title && (
<Title
as="h3"
level="h2"
className={styles.title}
weight="semiBold"
uppercase
>
{title}
</Title>
)}
{link && (
<Link className={styles.link} href={link.href}>
{link.text}