| 1 | "use client"; |
| 2 | |
| 3 | import { ArrowLeft, Palette, X } from "lucide-react"; |
| 4 | |
| 5 | import { type CreateThemeStep } from "./create-theme-types"; |
| 6 | |
| 7 | interface CreateThemeHeaderProps { |
| 8 | currentStep: CreateThemeStep; |
| 9 | onBack: () => void; |
| 10 | onClose: () => void; |
| 11 | } |
| 12 | |
| 13 | export function CreateThemeHeader({ |
| 14 | currentStep, |
| 15 | onBack, |
| 16 | onClose, |
| 17 | }: CreateThemeHeaderProps) { |
| 18 | const getStepTitle = (): string => { |
| 19 | const titles: Record<CreateThemeStep, string> = { |
| 20 | colors: "Colors", |
| 21 | fonts: "Fonts", |
| 22 | design: "Design", |
| 23 | save: "Save & Publish", |
| 24 | }; |
| 25 | return titles[currentStep]; |
| 26 | }; |
| 27 | |
| 28 | return ( |
| 29 | <div className="flex items-center justify-between border-b border-border p-4"> |
| 30 | <div className="flex items-center gap-3"> |
| 31 | <button |
| 32 | onClick={onBack} |
| 33 | className="rounded-lg p-1 transition-colors hover:bg-muted" |
| 34 | type="button" |
| 35 | > |
| 36 | <ArrowLeft className="size-5 text-foreground" /> |
| 37 | </button> |
| 38 | <Palette className="size-5 text-foreground" /> |
| 39 | <h2 className="text-lg font-semibold text-foreground"> |
| 40 | {getStepTitle()} |
| 41 | </h2> |
| 42 | </div> |
| 43 | <div className="flex items-center gap-2"> |
| 44 | <button |
| 45 | onClick={onClose} |
| 46 | className="rounded-lg p-1 transition-colors hover:bg-muted" |
| 47 | type="button" |
| 48 | > |
| 49 | <X className="size-5 text-foreground" /> |
| 50 | </button> |
| 51 | </div> |
| 52 | </div> |
| 53 | ); |
| 54 | } |
| 55 |