header.tsx 693 B

1234567891011121314151617181920212223242526
  1. 'use client';
  2. import { ThemeToggle } from './theme-toggle';
  3. interface HeaderProps {
  4. title: string;
  5. description?: string;
  6. actions?: React.ReactNode;
  7. }
  8. export function Header({ title, description, actions }: HeaderProps) {
  9. return (
  10. <header className="sticky top-0 z-30 flex h-16 items-center gap-4 border-b border-border bg-background px-6">
  11. <div className="flex-1">
  12. <h1 className="text-2xl font-semibold">{title}</h1>
  13. {description && (
  14. <p className="text-sm text-muted-foreground">{description}</p>
  15. )}
  16. </div>
  17. <div className="flex items-center gap-4">
  18. {actions}
  19. <ThemeToggle />
  20. </div>
  21. </header>
  22. );
  23. }