29 lines
926 B
TypeScript
29 lines
926 B
TypeScript
"use client"
|
|
|
|
import { motion } from "framer-motion"
|
|
import { cn } from "@/lib/utils"
|
|
|
|
interface PageHeaderProps {
|
|
title: string | React.ReactNode
|
|
description?: string
|
|
children?: React.ReactNode
|
|
className?: string
|
|
}
|
|
|
|
export function PageHeader({ title, description, children, className }: PageHeaderProps) {
|
|
return (
|
|
<motion.div
|
|
initial={{ opacity: 0, y: -10 }}
|
|
animate={{ opacity: 1, y: 0 }}
|
|
transition={{ duration: 0.3 }}
|
|
className={cn("flex items-center justify-between pb-6", className)}
|
|
>
|
|
<div>
|
|
<h1 className="text-2xl font-bold tracking-tight border-l-4 border-[#CC0000] dark:border-[#FF1111] pl-4 text-[#111111] dark:text-white">{title}</h1>
|
|
{description && <p className="text-sm text-[#444444] dark:text-[#AAAAAA] mt-1">{description}</p>}
|
|
</div>
|
|
{children && <div className="flex items-center gap-3">{children}</div>}
|
|
</motion.div>
|
|
)
|
|
}
|