feat: open contact modal from vendor card
This commit is contained in:
@@ -6,9 +6,10 @@ export interface ContactProps {
|
||||
contacts: readonly SiteConfigContact[]
|
||||
formVisibleFields?: readonly ContactFormField[]
|
||||
formPrefillValues?: Partial<ContactFormValues>
|
||||
submissionSource?: string
|
||||
}
|
||||
|
||||
export function Contact({ contacts, formVisibleFields, formPrefillValues }: ContactProps) {
|
||||
export function Contact({ contacts, formVisibleFields, formPrefillValues, submissionSource }: ContactProps) {
|
||||
return (
|
||||
<section className="py-4 bg-gray-50">
|
||||
<div className="max-w-225 mx-auto px-6">
|
||||
@@ -24,6 +25,7 @@ export function Contact({ contacts, formVisibleFields, formPrefillValues }: Cont
|
||||
idPrefix="contact-section-form"
|
||||
visibleFields={formVisibleFields}
|
||||
prefillValues={formPrefillValues}
|
||||
submissionSource={submissionSource}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -218,7 +218,12 @@ export function Header({ contacts = [], solutions = [], services = [] }: HeaderP
|
||||
</div>
|
||||
)}
|
||||
</nav>
|
||||
<ContactModal isOpen={isContactModalOpen} onClose={() => setIsContactModalOpen(false)} contacts={contacts} />
|
||||
<ContactModal
|
||||
isOpen={isContactModalOpen}
|
||||
onClose={() => setIsContactModalOpen(false)}
|
||||
contacts={contacts}
|
||||
submissionSource="header_modal"
|
||||
/>
|
||||
</header>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -8,15 +8,22 @@ interface Vendor {
|
||||
|
||||
interface VendorsProps {
|
||||
vendors?: Vendor[]
|
||||
onVendorLearnMore?: (vendorName?: string) => void
|
||||
}
|
||||
|
||||
export function Vendors({ vendors }: VendorsProps) {
|
||||
export function Vendors({ vendors, onVendorLearnMore }: VendorsProps) {
|
||||
if (vendors && vendors.length > 0) {
|
||||
return (
|
||||
<div className="max-w-400 mx-auto px-6 xl:px-12 2xl:px-16 py-20">
|
||||
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||
{vendors.map(({ name, description, products }, index) => (
|
||||
<VendorCard key={index} name={name} description={description} products={products} />
|
||||
<VendorCard
|
||||
key={index}
|
||||
name={name}
|
||||
description={description}
|
||||
products={products}
|
||||
onLearnMore={onVendorLearnMore}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user