diff --git a/apps/admin/src/components/page-builder/HeroV2Form.tsx b/apps/admin/src/components/page-builder/HeroV2Form.tsx new file mode 100644 index 0000000..44d3153 --- /dev/null +++ b/apps/admin/src/components/page-builder/HeroV2Form.tsx @@ -0,0 +1,159 @@ +import { UploadCloud, Image as ImageIcon } from 'lucide-react'; +import { type PageSection } from '@homaroma/types'; + +interface HeroV2FormProps { + editingSection: Partial; + editingLang: string; + getLocalizedValue: (payload: any, field: string) => string; + updateLocalizedValue: (field: string, value: string) => void; + updatePayloadValue: (field: string, value: string | number | boolean) => void; + setUploadTarget: (target: { type: 'main' | 'slide'; index?: number } | null) => void; + setIsMediaModalOpen: (open: boolean) => void; +} + +export default function HeroV2Form({ + editingSection, + getLocalizedValue, + updateLocalizedValue, + updatePayloadValue, + setUploadTarget, + setIsMediaModalOpen, +}: HeroV2FormProps) { + return ( +
+ {/* Hero image uploading */} +
+ +
{ + setUploadTarget({ type: 'main' }); + setIsMediaModalOpen(true); + }} + > + {editingSection.payload?.imageUrl ? ( + <> + Hero Background +
+ +
+ + ) : ( +
+ +

Select Image

+
+ )} +
+
+ +
+ + +
+ +
+ updatePayloadValue('showOrnament', e.target.checked)} + className="rounded bg-slate-900 border-white/10" + /> + +
+ +
+ + updateLocalizedValue('tagline', e.target.value)} + className="admin-input w-full" + /> +
+ +
+ + updateLocalizedValue('title', e.target.value)} + className="admin-input w-full" + /> +

Use [brackets] for golden accent serif text (e.g. Inhale [Serenity]).

+
+ +
+ +