fix: correct conditional header content styles
This commit is contained in:
@@ -4,14 +4,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: grid;
|
||||||
justify-content: space-between;
|
grid-template-areas: "title link";
|
||||||
|
grid-template-columns: 1fr max-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
grid-area: title;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.link {
|
||||||
|
grid-area: link;
|
||||||
|
}
|
||||||
.subtitle {
|
.subtitle {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
|
|||||||
@@ -18,9 +18,11 @@ export default async function CurrentBenefitsBlock({
|
|||||||
return (
|
return (
|
||||||
<section className={styles.container}>
|
<section className={styles.container}>
|
||||||
<header className={styles.header}>
|
<header className={styles.header}>
|
||||||
<Title as="h3" level="h2" className={styles.title} uppercase>
|
{title && (
|
||||||
{title}
|
<Title as="h3" level="h2" className={styles.title} uppercase>
|
||||||
</Title>
|
{title}
|
||||||
|
</Title>
|
||||||
|
)}
|
||||||
{link && (
|
{link && (
|
||||||
<Link className={styles.link} href={link.href}>
|
<Link className={styles.link} href={link.href}>
|
||||||
{link.text}
|
{link.text}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import Button from "@/components/TempDesignSystem/Button"
|
|||||||
import Title from "@/components/Title"
|
import Title from "@/components/Title"
|
||||||
|
|
||||||
import styles from "./next.module.css"
|
import styles from "./next.module.css"
|
||||||
|
|
||||||
import { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage"
|
import { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage"
|
||||||
|
|
||||||
export default async function NextLevelBenefitsBlock({
|
export default async function NextLevelBenefitsBlock({
|
||||||
@@ -19,14 +20,16 @@ export default async function NextLevelBenefitsBlock({
|
|||||||
return (
|
return (
|
||||||
<section className={styles.container}>
|
<section className={styles.container}>
|
||||||
<header className={styles.header}>
|
<header className={styles.header}>
|
||||||
<Title as="h3" level="h2" uppercase className={styles.title}>
|
{title && (
|
||||||
{title}
|
<Title as="h3" level="h2" uppercase className={styles.title}>
|
||||||
{link && (
|
{title}
|
||||||
<Link className={styles.link} href={link.href}>
|
</Title>
|
||||||
{link.text}
|
)}
|
||||||
</Link>
|
{link && (
|
||||||
)}
|
<Link className={styles.link} href={link.href}>
|
||||||
</Title>
|
{link.text}
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
</header>
|
</header>
|
||||||
{subtitle && <p className={styles.subtitle}>{subtitle}</p>}
|
{subtitle && <p className={styles.subtitle}>{subtitle}</p>}
|
||||||
<div className={styles.cardContainer}>
|
<div className={styles.cardContainer}>
|
||||||
|
|||||||
@@ -4,8 +4,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: grid;
|
||||||
justify-content: space-between;
|
grid-template-areas: "title link";
|
||||||
|
grid-template-columns: 1fr max-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
grid-area: title;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link {
|
||||||
|
grid-area: link;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cardContainer {
|
.cardContainer {
|
||||||
|
|||||||
@@ -1,6 +1,16 @@
|
|||||||
.header {
|
.header {
|
||||||
display: grid;
|
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 {
|
.subtitle {
|
||||||
|
|||||||
@@ -10,15 +10,17 @@ export default function Header({ title, subtitle, link }: HeaderProps) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<header className={styles.header}>
|
<header className={styles.header}>
|
||||||
<Title
|
{title && (
|
||||||
as="h3"
|
<Title
|
||||||
level="h2"
|
as="h3"
|
||||||
className={styles.title}
|
level="h2"
|
||||||
weight="semiBold"
|
className={styles.title}
|
||||||
uppercase
|
weight="semiBold"
|
||||||
>
|
uppercase
|
||||||
{title}
|
>
|
||||||
</Title>
|
{title}
|
||||||
|
</Title>
|
||||||
|
)}
|
||||||
{link && (
|
{link && (
|
||||||
<Link className={styles.link} href={link.href}>
|
<Link className={styles.link} href={link.href}>
|
||||||
{link.text}
|
{link.text}
|
||||||
|
|||||||
Reference in New Issue
Block a user