react-image-video-lightbox
react-image-video-lightbox copied to clipboard
How we can set the z index of the background div created
How we can set the z index of the background div created. In my case when i set the z-index from f12 console of chrome it is fixed.
you can place a div contains a class as parent and then in css file set style for div. Like below example :
.lightBoxModal > div{ z-index: 200; }
<div className="lightBoxModal"> {!!isOpen && ( <ReactImageVideoLightbox className="z-[100]" data={[ { url: "https://placekitten.com/450/300", type: "photo", altTag: "some image", }, { url: "https://www.youtube.com/embed/ScMzIvxBSi4", type: "video", title: "some video", }, { url: "https://placekitten.com/550/500", type: "photo", altTag: "some other image", }, { url: "https://www.youtube.com/embed/ScMzIvxBSi4", type: "video", title: "some other video", }, ]} startIndex={0} showResourceCount={true} onCloseCallback={() => setIsOpen(false)} onNavigationCallback={(currentIndex) => console.log(
Current index: ${currentIndex}`)
}
/>
)}
</div>
`