react-newsgrid-gallery

1.0.4 • Public • Published

react-newsgrid-gallery

A react grid gallery widget !

NPM JavaScript Style Guide

Install

npm install --save react-newsgrid-gallery

Usage

import React, { Component } from 'react'

import MyComponent from 'react-newsgrid-gallery'
import 'react-newsgrid-gallery/dist/index.css'

class Example extends Component {
  render() {
    return <NewsGridGallery
               data={[{title: 'title 1'}, {title: 'title 2'}, {title: 'title 3'}, {title: 'title 4'}]}
               renderItem={({title}) => (<div>{title}</div>)}
               grid={[
                 {w: 30, h: 50, x: 0, y: 0},
                 {w: 40, h: 100, x: 30, y: 0},
                 {w: 30, h: 50, x: 70, y: 0},
                 {w: 30, h: 50, x: 0, y: 50},
                 {w: 30, h: 50, x: 70, y: 50},
               ]}
           />
  }
}

Screenshot

Alt Text

Alt Text

License

MIT © huseyiniriss

/react-newsgrid-gallery/

    Package Sidebar

    Install

    npm i react-newsgrid-gallery

    Weekly Downloads

    2

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    244 kB

    Total Files

    7

    Last publish

    Collaborators

    • huseyiniriss