@lumx/react 3.7.6-alpha.1 → 3.7.6-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -1404,6 +1404,7 @@ interface ImageLightboxProps extends HasClassName, ZoomProps, ImagesProps, Inher
1404
1404
 
1405
1405
  /** Subset of the ImageLightboxProps managed by the useImageLightbox hook */
1406
1406
  type ManagedProps = Pick<ImageLightboxProps, 'isOpen' | 'images' | 'parentElement' | 'activeImageRef' | 'onClose' | 'activeImageIndex'>;
1407
+ type TriggerOptions = Pick<ImageLightboxProps, 'activeImageIndex'>;
1407
1408
  /**
1408
1409
  * Set up an ImageLightbox with images and triggers.
1409
1410
  *
@@ -1411,19 +1412,19 @@ type ManagedProps = Pick<ImageLightboxProps, 'isOpen' | 'images' | 'parentElemen
1411
1412
  * - Associate a trigger with an image to display on open
1412
1413
  * - Automatically provide a view transition between an image trigger and the displayed image on open & close
1413
1414
  *
1414
- * @param images Images to display in the image lightbox
1415
+ * @param initialProps Images to display in the image lightbox
1415
1416
  */
1416
- declare function useImageLightbox(images?: ImageLightboxProps['images']): {
1417
+ declare function useImageLightbox<P extends Partial<ImageLightboxProps>>(initialProps: P): {
1417
1418
  /**
1418
1419
  * Generates trigger props
1419
1420
  * @param index Provide an index to choose which image to display when the image lightbox opens.
1420
1421
  * */
1421
- getTriggerProps: (index?: number) => {
1422
+ getTriggerProps: (options: TriggerOptions) => {
1422
1423
  onClick: React.MouseEventHandler;
1423
1424
  ref: React.Ref<any>;
1424
1425
  };
1425
1426
  /** Props to forward to the ImageLightbox */
1426
- imageLightboxProps: ManagedProps;
1427
+ imageLightboxProps: P & ManagedProps;
1427
1428
  };
1428
1429
 
1429
1430
  /**