ldc-ovoteam/resources/ts/front/Components/Theme/PageHeader.tsx
Jérémy Munsch 522cf7a87e
style: improve text wrapping and overflow handling in components
- Enhanced text wrapping and overflow handling in BreadcrumbsBase, ItemCard, PageHeader, Show (Products), and Show (Recipes) components for better responsiveness and readability.
2026-11-04 10:18:51 +01:00

38 lines
931 B
TypeScript

import Breadcrumbs from "$/uwil/Breadcrumbs";
import { cn } from "@/lib/utils";
import { TextProps } from "@/types/front";
import Section from "$/uwil/Section";
import { bgColors } from "@/front/lib/constants";
type PageHeaderProps = {
title: TextProps;
description: TextProps;
};
export default function PageHeader(props: PageHeaderProps) {
const { title, description } = props;
return (
<Section
variant={bgColors.PRIMARY}
className="text-start"
containerClassName="space-y-0 md:px-4"
>
<Breadcrumbs />
<h1
className={cn(
"uppercase text-4xl font-bold mt-4 break-words [overflow-wrap:anywhere]",
title.font,
)}
>
{title.text}
</h1>
<p
className={cn(
"mt-4 break-words [overflow-wrap:anywhere]",
description.font,
)}
>
{description.text}
</p>
</Section>
);
}