@heimr/react-image-gallery

Image gallery for Heimr sites

Usage no npm install needed!

<script type="module">
  import heimrReactImageGallery from 'https://cdn.skypack.dev/@heimr/react-image-gallery';
</script>

README

Image gallery component for Heimr React pages

A wrapper around react-image-lightbox component to use in Heimr pages. It is currently dependent on @accodeing/gatsby-theme-heimr, but only on Card components. Those components should probably be extracted from that theme and included explicitly here to be able to drop the dependency on Gatsby for this project.

Build

Build the package with yarn build. Note that the files being included in the build is the one specified in the files list in package.json.

Usage

Note that you need to import the CSS file explicitly to get it to work. Something like this:

import { ImageGallery } from '@heimr/react-image-gallery'
import '@heimr/react-image-gallery/style.css'

Since we need to import the css file explicitly like this, we can probably remove the style import in ImageGallery.