File size: 674 Bytes
d97b8f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import React from "react";

interface PageHeaderProps {
  heading: string;
  description?: string;
  children?: React.ReactNode;
}

export const PageHeader: React.FC<PageHeaderProps> = ({

  heading,

  description,

  children,

}) => {
  return (
    <div className="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 mb-6">

      <div>

        <h1 className="text-2xl font-bold tracking-tight">{heading}</h1>

        {description && (

          <p className="text-muted-foreground mt-1">{description}</p>

        )}

      </div>

      {children && <div className="flex items-center gap-2">{children}</div>}

    </div>
  );
};