Fslightbox
Installation
npm i fslightbox-react
Script
import FsLightbox from 'fslightbox-react'
import img1 from '../../assets/images/img1.jpeg'
const Fslightbox = () => {
const [imageController, setImageController] = useState({
toggler: false,
slide: 1
});
function imageOnSlide(number) {
setImageController({
toggler: !imageController.toggler,
slide: number
});
}
return (
<Link onClick={() => imageOnSlide(1)} to="#">
<Image src={img1} className="img-fluid bg-soft-info rounded" alt="profile-image" />
</Link>
)
}