refactor(ui): extract reusable component package

This commit is contained in:
vince 2026-06-20 05:27:09 +02:00
parent 87261b5a3f
commit 2664804e91
86 changed files with 102 additions and 85 deletions

View file

@ -1,30 +0,0 @@
import { useId } from "react";
import type { UiModuleBlock } from "../types";
import { ModuleCard } from "./ModuleCard";
export interface DashboardHeaderProps {
title: string;
subtitle?: string;
eyebrow?: string;
module?: UiModuleBlock;
}
export function DashboardHeader({
title,
subtitle,
eyebrow,
module,
}: DashboardHeaderProps) {
const titleId = useId();
return (
<header className="dashboard-header" aria-labelledby={titleId}>
<div>
{eyebrow ? <p>{eyebrow}</p> : null}
<h1 id={titleId}>{title}</h1>
{subtitle ? <span>{subtitle}</span> : null}
</div>
{module ? <ModuleCard module={module} /> : null}
</header>
);
}