react-spring-lightbox icon indicating copy to clipboard operation
react-spring-lightbox copied to clipboard

Use Next.js image component instead of vanilla img element.

Open Arsh1a opened this issue 2 years ago • 4 comments
trafficstars

Is there a way to replace img element with Image component from Next.js?

Arsh1a avatar May 10 '23 08:05 Arsh1a

+1, it would be great if you could provide a custom component (similar to the render props for header, next/prev buttons, etc) allowing users to render their own image element.

breadadams avatar May 16 '23 18:05 breadadams

From taking a look at the code here this would mean moving the click/drag events and styling to a parent element, to keep things as simple as possible. I'm happy to put something together if it's welcome @tim-soft.

breadadams avatar May 16 '23 20:05 breadadams

@breadadams this would be a great addition to the library, not only to support next/image but also any arbitrary nodes -- it makes the lightbox a lot more flexible

what kind of api/prop change would you propose for this to work?

edit: PRs are always appreciated 👍

tim-soft avatar May 18 '23 04:05 tim-soft

+1 from me as well. This would be super awesome.

trebeljahr avatar May 20 '23 15:05 trebeljahr