refactor: organize css

This commit is contained in:
Arvid Norlin
2024-05-28 12:36:13 +02:00
parent f68b184d93
commit 1aa3b39c17
11 changed files with 243 additions and 262 deletions

View File

@@ -0,0 +1,20 @@
import { Fragment } from "react"
import Title from "@/components/Title"
import styles from "./overviewTableTitle.module.css"
import { OverviewTableTitleProps } from "@/types/components/loyalty/blocks"
export default function OverviewTableTitle({ texts }: OverviewTableTitleProps) {
return (
<Title as="h1" level="h1" weight="semiBold" uppercase>
{texts.map(({ text, highlight }, idx) => (
<Fragment key={idx}>
<span className={highlight ? styles.highlight : ""}>{text}</span>
{idx < texts.length - 1 && " "}
</Fragment>
))}
</Title>
)
}