react-mason

1.1.2 • Public • Published

react-mason

Masonry usage

react-mason is a masonry-grid component.

Installation

npm install react-mason

Usage

Pass children to the Masonry component

import React, { Component } from 'react';
import Masonry from 'react-mason';
import Photo from './Photo';
 
class PhotoAlbum extends Component {
  render() {
    return (
      <Masonry>
        {
          this.props.photos.map(photo => <Photo {...photo} />)
        }
      </Masonry>
    )
  }
}

Readme

Keywords

Package Sidebar

Install

npm i react-mason

Weekly Downloads

5

Version

1.1.2

License

MIT

Last publish

Collaborators

  • sanchit.nevgi