1.0.4 • Published 6 years ago

rc-photo-grid v1.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

React photo-grid

Travis npm package Coveralls

A React component photo-grid like google search photo grid! inspired by the blog

demo

live demo

API

PhotoGrid props

namedescriptiontypedefault
photosphoto listArrayString or Arrary{url: String, width: Number, height: Number}[]
unitphoto height unitNumber200

you can install by run npm i --save rc-photo-grid

example:

const cats = [
  {
    "url": "photo-103450229.jpg",
    "width": 675,
    "height": 900
  },
  {
    "url": "photo-108273877.jpg",
    "width": 1170,
    "height": 780
  },
  {
    "url": "photo-115203323.jpg",
    "width": 1170,
    "height": 780
  },
]

class Demo1 extends Component {
  render() {
    const photos = cats.map(
      cat => 'https://xieranmaya.github.io/images/cats/' + cat.url
    )
    return (
      <div>
        <h1>photo-grid Demo with url</h1>
        <PhotoGrid photos={photos} />
      </div>
    )
  }
}

Licensed

MIT

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago