0.1.6 • Published 3 years ago

@pierreneter/react-fb-image-grid v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-fb-image-grid

An image library that's used to show the images in beautiful grids.

Below you will find some information on how to perform common tasks.

Fix for Nextjs

yarn add react-image-lightbox@^5.0.0
// _app.{js,tsx}
import "react-image-lightbox/style.css";
import "@pierreneter/react-fb-image-grid/src/css/style.css";
// anywhere
import FbImageLibrary from "@pierreneter/react-fb-image-grid";

Table of Contents

What's new v0.1.5

  • Fixed key warning.

Demo

react-fb-image-grid

Some Features Video

https://youtu.be/HdEhsDNkw6s

Installation

Run the following

npm install react-fb-image-grid

or

yarn add react-fb-image-grid

Basic Usage

import FbImageLibrary from 'react-fb-image-grid'

<FbImageLibrary images={[]}/>

Props

PropsTypeDefaultExample
imagesArray (String)required{['https://some-url.com/image.jpg', importedImage]} //Local image should be imported first
countFromNumber5{2} //Should be from 1 to 5
hideOverlayBooleanfalse{true}
renderOverlayFunction() => 'Preview Image'{() => <button>Show Image</button>}
overlayBackgroundColorString#222222'green' or '#000000' or 'rgb(255, 26, 26)'
onClickEachFunctionnull{({src, index}) => {}}

Pull Requests

Feel free to make Pull Requests for your feature/fix. To run the project, run

npm install

or

yarn

then

npm start

License

MIT