1.0.0 • Published 5 years ago
react-flicker-photos v1.0.0
react-flicker-photos
React component for viewing photos list of Flicker user
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
1.0.0
5 years ago