react-flicker-photos

1.0.0 • Public • Published

react-flicker-photos

React component for viewing photos list of Flicker user

NPM JavaScript Style Guide

Install

npm install --save react-flicker-photos

Usage

import React, { Component } from 'react'
import ReactFlickerPhotos from 'react-flicker-photos'

class Example extends Component {
  render () {
    return (
      <ReactFlickerPhotos 
        UserID={UserId}
        ClickCallback={ClickCallback}
        ImagesPerPage={ImagesPerPage} />
    )
  }
}

Required inputs

Input Type Description
UserID String Flicker user id
ClickCallback Function A function to be called when photo is clicked
ImagesPerPage Number Number of images to be loaded at same time

Callback Function

The passed callback function is called when a photo is clicked. It got one argument, an object of two properties in the below table:

property Type Description
src String Photo original size source url
title String Photo title

Todo

  • Handling Errors
  • Increase unit testing coverage
  • Get the API key as an input
  • Improve infinite scrolling behavior
  • Improve UI

License

(MIT) © AbdallahZac

Readme

Keywords

none

Package Sidebar

Install

npm i react-flicker-photos

Weekly Downloads

2

Version

1.0.0

License

(MIT)

Unpacked Size

1.15 MB

Total Files

6

Last publish

Collaborators

  • abdallahzac