blob: 0254f4a39c84beaad3b228d4d4da45d04531956c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
"use client";
import type { ReactNode } from "react";
import { cn } from "@/lib/utils";
interface HeaderBaseProps {
leftContent?: ReactNode;
centerContent?: ReactNode;
rightContent?: ReactNode;
className?: string;
children?: ReactNode;
}
export function HeaderBase({
leftContent,
centerContent,
rightContent,
className,
children,
}: HeaderBaseProps) {
// If children is provided, render it directly without the grid layout
if (children) {
return (
<header className={cn("px-6 h-16 flex items-center", className)}>
{children}
</header>
);
}
return (
<header className={cn("px-6 h-14 flex justify-between", className)}>
{leftContent && leftContent}
{centerContent && centerContent}
{rightContent && rightContent}
</header>
);
}
|