lucaspulliese / vue-cool-lightbox

Vue.js lightbox inspired by fancybox.
https://vue-cool-lightbox.lucaspulliese.com
340 stars 56 forks source link

Slot for content / PDF support #32

Closed elalekey closed 4 years ago

elalekey commented 4 years ago

I was looking for the possibility to show one more PDF I couldn't find it... it would be good if there was a SLOT to be able to place the content you want.

lucaspulliese commented 4 years ago

Yep, add a slot for custom content sounds good, I will be working on it.

elalekey commented 4 years ago

Great @lucaspulliese awesome job!

One question.. can you do something similar with the zoom as in Slack? that even though you can already see the image in a respectable size.. you can make it an extra zoom, actually the library works perfectly.. but is it possible?

image

and.. to be able to add custom? buttons that one can generate one's own functionality..

image

I think it would be something simple like...

<slot name="custom-button" @click="$emit('header-action')>

lucaspulliese commented 4 years ago

Sorry for the late replies, I'm currently very busy.

That zoom effect sounds good, I will try to add it. And yes, but I'm going to check if I can add it as a "repeatable slot".

Thanks for the ideas!

elalekey commented 4 years ago

Okay! good luck and awesome job.

lucaspulliese commented 4 years ago

I was doing the custom button enhancement, you think something like this it's ok for you?

Captura

This way you don't need to emit the event, also It's not possible to emit an event from a slot.

elalekey commented 4 years ago

Sorry I'm late.. that's fine I agree.. by the way a note, some companies like all designs to be uniform.. What do I mean with this? If the X is blue.. the rest of the buttons must be blue.. with the same width * height measurements, etc. I know I'm asking a lot but I do it as a suggestion..if the CLOSE button could be customizable..thanks anyway for all these optimizations.

lucaspulliese commented 4 years ago

It's ok, don't worry!

Yep, I should add a slot for the close button.

lucaspulliese commented 4 years ago

Hi @elalekey!

Now in version 2.3.0 you have the slot for the close button, and you have a prop called useZoomBar, by default is false. If you set that prop to true you can use a zoom like Slack.

I'm still working on the custom buttons and the custom content slot.

elalekey commented 4 years ago

Yo.. @lucaspulliese thanks you very very much. Do you have a release date for the pdf version?

btw bro remember the "read me" github for users, if there's anything I can help you with, let me know

lucaspulliese commented 4 years ago

remember the "read me" github for users, if there's anything I can help you with, let me know

Yes, I know, today I will update the readme, and the docs too.

Do you have a release date for the pdf version?

Not yet, I'm sorry, maybe this weekend. But just to be clear, do you want a slot where you can insert custom content right? The pdf is something that is on your own, isn't a functionality from the lightbox.

I'm correct?

lucaspulliese commented 4 years ago

I added a small fix in version 2.3.1, so if you use the zoom bar like Slack use that version :)

elalekey commented 4 years ago

Sorry for answering so late.. answering your previous question.. basically yes, I could use a slot to be able to place custom content.. regarding the PDF I think you could render it according to what you send it.. for example.. if the "type" is PDF instead of placing a tag you will place a