feat: add textTransform prop to section headers

This commit is contained in:
Chuma McPhoy
2024-07-10 13:39:00 +02:00
parent ea8165bec9
commit f71d0a07d5
2 changed files with 5 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ export default function SectionHeader({
subtitle, subtitle,
title, title,
topTitle = false, topTitle = false,
textTransform,
}: HeaderProps) { }: HeaderProps) {
return ( return (
<header className={styles.header}> <header className={styles.header}>
@@ -19,6 +20,7 @@ export default function SectionHeader({
as={topTitle ? "h3" : "h4"} as={topTitle ? "h3" : "h4"}
className={styles.title} className={styles.title}
level={topTitle ? "h1" : "h2"} level={topTitle ? "h1" : "h2"}
textTransform={textTransform}
> >
{title} {title}
</Title> </Title>

View File

@@ -1,9 +1,12 @@
import { HeadingProps } from "@/components/TempDesignSystem/Text/Title/title"
export type HeaderProps = { export type HeaderProps = {
link?: { link?: {
href: string href: string
text: string text: string
} }
subtitle: string | null subtitle: string | null
textTransform?: HeadingProps["textTransform"]
title: string | null title: string | null
topTitle?: boolean topTitle?: boolean
} }