taxonomy/components/dashboard/header.tsx

24 lines
500 B
TypeScript
Raw Permalink Normal View History

2022-10-26 13:18:06 +00:00
interface DashboardHeaderProps {
heading: string
text?: string
children?: React.ReactNode
}
export function DashboardHeader({
heading,
text,
children,
}: DashboardHeaderProps) {
return (
<div className="flex justify-between px-2">
<div className="grid gap-1">
2022-11-04 12:55:31 +00:00
<h1 className="text-2xl font-bold tracking-wide text-slate-900">
2022-10-26 13:18:06 +00:00
{heading}
</h1>
2022-11-04 12:55:31 +00:00
{text && <p className="text-neutral-500">{text}</p>}
2022-10-26 13:18:06 +00:00
</div>
{children}
</div>
)
}