Masonry gallery based on ReactJS component.
All the credit for @dudleystorey for his black magic post about flex ratios:
Clone this repository and run:
$ npm install
To run the lint tasks we have dependencies of:
If that tools are not installed you cant commit. Because the lint pass never will be ok.
$ npm run dev
This command will build your .sass
, .jsx
and .js
files and open a local development environment, with hot reloading. A browser window will be opened as well, showing the entry point of your documents folder for development purposes.
$ npm run test:watch
$ npm test
const images = [
'orange-butterfly.jpg', 'butterfly-on-yellow-flower.jpg',
'butterfly-on-petal.jpg', 'albino-butterfly.jpg',
'blue-butterfly.jpg'].map( filename => `https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/${filename}` );
React.render(<MasonryGallery images={images}/>, document.getElementById('main'));