/** * GalleryCarouselSettingsSectionCompact * * Compact settings for gallery carousel navigation buttons in constructor sidebar. * Allows selecting custom icons for prev, next, and back buttons. */ import React from 'react'; import type { AssetOption } from '../../types/constructor'; import { addFallbackAssetOption } from '../../lib/constructorHelpers'; interface GalleryCarouselSettingsSectionCompactProps { prevIconUrl: string; nextIconUrl: string; backIconUrl: string; backLabel: string; // Button dimensions prevWidth: string; prevHeight: string; nextWidth: string; nextHeight: string; backWidth: string; backHeight: string; iconAssetOptions: AssetOption[]; onUpdateElement: (patch: { galleryCarouselPrevIconUrl?: string; galleryCarouselNextIconUrl?: string; galleryCarouselBackIconUrl?: string; galleryCarouselBackLabel?: string; galleryCarouselPrevWidth?: string; galleryCarouselPrevHeight?: string; galleryCarouselNextWidth?: string; galleryCarouselNextHeight?: string; galleryCarouselBackWidth?: string; galleryCarouselBackHeight?: string; }) => void; } const GalleryCarouselSettingsSectionCompact: React.FC< GalleryCarouselSettingsSectionCompactProps > = ({ prevIconUrl, nextIconUrl, backIconUrl, backLabel, prevWidth, prevHeight, nextWidth, nextHeight, backWidth, backHeight, iconAssetOptions, onUpdateElement, }) => { return (

Carousel navigation

{/* Previous button */}

Previous

{prevIconUrl && (
onUpdateElement({ galleryCarouselPrevWidth: event.target.value, }) } /> onUpdateElement({ galleryCarouselPrevHeight: event.target.value, }) } />
)} {/* Next button */}

Next

{nextIconUrl && (
onUpdateElement({ galleryCarouselNextWidth: event.target.value, }) } /> onUpdateElement({ galleryCarouselNextHeight: event.target.value, }) } />
)} {/* Back button */}

Back

{backIconUrl ? (
onUpdateElement({ galleryCarouselBackWidth: event.target.value, }) } /> onUpdateElement({ galleryCarouselBackHeight: event.target.value, }) } />
) : ( onUpdateElement({ galleryCarouselBackLabel: event.target.value }) } /> )}

Set icon + dimensions for navigation-style buttons. Drag to reposition.

); }; export default GalleryCarouselSettingsSectionCompact;