import React from "react"; import type { LucideIcon } from "lucide-react"; import { cn } from "@/lib/utils"; export interface PageHeaderProps { icon?: LucideIcon | React.ReactNode; title: React.ReactNode; subtitle?: React.ReactNode; actions?: React.ReactNode; className?: string; } export function PageHeader({ icon: Icon, title, subtitle, actions, className }: PageHeaderProps) { return (
{Icon && (
{React.isValidElement(Icon) ? Icon : React.createElement(Icon as React.ComponentType<{ className?: string }>, { className: "h-6 w-6", })}
)}

{title}

{subtitle &&
{subtitle}
}
{actions &&
{actions}
}
); }