onClick open a Link... or a Modal with content ?!?
xstable opened this issue · 1 comments
xstable commented
Is it possible in any way to modify this component to archive this:
I wan't to use this Gallery for a reference list. So if you click on an Image, not the image will be shown in full-size, but an kind of modal with Text I do injected (e.g. Company description)
Or as alternative if you click on an Image, it will open an URL instead of showing the full-sized image.
Would this be possible?
itoldya commented
Hello @xstable!
Yes, it's possible. You can override opening a lightbox by using onClickThumbnail
prop.
function App() {
const handleClick = () => window.open("https://codesandbox.io/");
return <Gallery onClickThumbnail={handleClick} images={images} />;
}
Feel free to reopen the issue if you have more questions. Have a good day!