File size: 978 Bytes
1643ce8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import type { ReactNode } from "react";

type PageHeaderProps = {
  title: string;
  subtitle?: string;
  right?: ReactNode;
};

export function PageHeader({ title, subtitle, right }: PageHeaderProps) {
  return (
    <header className="mb-8 border-b border-gray-200 pb-4">
      <div className="grid grid-cols-[auto,1fr,auto] items-center gap-4">
        <div className="flex items-center">
          <img
            src="/assets/prosento-logo.png"
            alt="Company logo"
            className="h-12 w-auto object-contain"
            loading="eager"
          />
        </div>

        <div className="text-center">
          <h1 className="text-2xl md:text-3xl font-bold text-gray-900 whitespace-nowrap">
            {title}
          </h1>
          {subtitle ? (
            <p className="text-gray-600 whitespace-nowrap">{subtitle}</p>
          ) : null}
        </div>

        <div className="flex justify-end">{right}</div>
      </div>
    </header>
  );
}