| 1 |
/** |
| 2 |
* Section Header Component |
| 3 |
* Reusable header for all trip form sections |
| 4 |
*/ |
| 5 |
|
| 6 |
import React from "react"; |
| 7 |
import { LucideIcon } from "lucide-react"; |
| 8 |
import { __ } from "../../../lib/i18n"; |
| 9 |
|
| 10 |
interface SectionHeaderProps { |
| 11 |
icon: LucideIcon; |
| 12 |
title: string; |
| 13 |
description?: string; |
| 14 |
} |
| 15 |
|
| 16 |
export const SectionHeader: React.FC<SectionHeaderProps> = ({ |
| 17 |
icon: Icon, |
| 18 |
title, |
| 19 |
description, |
| 20 |
}) => { |
| 21 |
return ( |
| 22 |
<div className="mb-4"> |
| 23 |
<div className="flex items-center gap-2 mb-2"> |
| 24 |
<Icon className="w-5 h-5 text-gray-500" /> |
| 25 |
<h2 className="text-lg font-semibold text-gray-900 dark:text-white"> |
| 26 |
{__(title, title)} |
| 27 |
</h2> |
| 28 |
</div> |
| 29 |
{description && ( |
| 30 |
<p className="text-sm text-gray-600 dark:text-gray-400"> |
| 31 |
{__(description, description)} |
| 32 |
</p> |
| 33 |
)} |
| 34 |
</div> |
| 35 |
); |
| 36 |
}; |
| 37 |
|