RobinCK / vue-gallery

:camera: Responsive and customizable image and video gallery, carousel and lightbox, optimized for both mobile and desktop web browsers. 🇺🇦
https://robinck.github.io/vue-gallery/
MIT License
470 stars 85 forks source link

Custom close button or click event handler? #74

Open alancwoo opened 5 years ago

alancwoo commented 5 years ago

I was wondering if there's any way to make a custom close button for the lightbox? I can't seem to find any props that can be passed on the blueimp documentation. Alternatively, how could one rig a custom button to the .close() api on the gallery directly?

e.g. <a href="#close" @click="gallery.close()">Close</a>

I'm not sure how to reference the gallery component in the click handler.

arg-1138 commented 5 years ago

You can use the component slot="close" to have a custom close button, same as for example "next" and "prev": <div slot="close"></div>