react-photo-gallery icon indicating copy to clipboard operation
react-photo-gallery copied to clipboard

How exactly is this implemented?

Open MotorCityCobra opened this issue 5 years ago • 2 comments

import Gallery from "react-photo-gallery"

and

Gallery photos={photos} in the jsx?

?

Why not show how this works in an entire component like everyone else does with their npm packages? I don't get any images displayed after trying many combinations.

MotorCityCobra avatar Feb 09 '20 14:02 MotorCityCobra

const photos = [
  {
    src: 'http://example.com/example/img1.jpg',
    width: 4,
    height: 3
  },
  {
    src: 'http://example.com/example/img2.jpg',
    width: 1,
    height: 1
  }
];

<Gallery photos={photos} />;

seems pretty straight forward?

KennyHammerlund avatar Feb 23 '20 15:02 KennyHammerlund

Add require like such { src: require("./images/1.jpg"), width: 1863, height: 1000 },

TayyabNaveed avatar Sep 27 '20 20:09 TayyabNaveed