react-ig-feed
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -12,2 +12,4 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var styles = {"instagramItems":"_2R-kh","instagramItem":"_wPDyp","instagramImg":"_vzTHL","instagramIcon":"_3xnQP"}; | ||
var InstagramFeed = /*#__PURE__*/function (_Component) { | ||
@@ -20,5 +22,20 @@ _inheritsLoose(InstagramFeed, _Component); | ||
_this = _Component.call(this, props) || this; | ||
_this.getWindowDimensions = function () { | ||
_this.setState({ | ||
width: window.innerWidth | ||
}); | ||
}; | ||
_this.toggleHover = function () { | ||
_this.setState({ | ||
hover: !_this.state.hover | ||
}); | ||
}; | ||
_this.state = { | ||
feeds: [], | ||
isLoaded: false | ||
isLoaded: false, | ||
hover: false, | ||
width: '' | ||
}; | ||
@@ -63,7 +80,7 @@ return _this; | ||
return /*#__PURE__*/React__default.createElement("div", { | ||
className: "ig-instagram-items" | ||
className: styles.instagramItems | ||
}, feeds.slice(0, this.props.counter).map(function (feed, index) { | ||
return /*#__PURE__*/React__default.createElement("div", { | ||
key: index, | ||
className: "ig-instagram-item" | ||
className: styles.instagramItem | ||
}, /*#__PURE__*/React__default.createElement("a", { | ||
@@ -76,2 +93,3 @@ key: index, | ||
}, /*#__PURE__*/React__default.createElement("img", { | ||
className: styles.instagramImg, | ||
key: index, | ||
@@ -81,3 +99,3 @@ src: feed.media_url, | ||
}), /*#__PURE__*/React__default.createElement("div", { | ||
className: "instagram-count" | ||
className: styles.instagramIcon | ||
}, /*#__PURE__*/React__default.createElement("div", { | ||
@@ -84,0 +102,0 @@ className: "instagram-count-item" |
@@ -9,2 +9,4 @@ import React, { Component } from 'react'; | ||
var styles = {"instagramItems":"_2R-kh","instagramItem":"_wPDyp","instagramImg":"_vzTHL","instagramIcon":"_3xnQP"}; | ||
var InstagramFeed = /*#__PURE__*/function (_Component) { | ||
@@ -17,5 +19,20 @@ _inheritsLoose(InstagramFeed, _Component); | ||
_this = _Component.call(this, props) || this; | ||
_this.getWindowDimensions = function () { | ||
_this.setState({ | ||
width: window.innerWidth | ||
}); | ||
}; | ||
_this.toggleHover = function () { | ||
_this.setState({ | ||
hover: !_this.state.hover | ||
}); | ||
}; | ||
_this.state = { | ||
feeds: [], | ||
isLoaded: false | ||
isLoaded: false, | ||
hover: false, | ||
width: '' | ||
}; | ||
@@ -60,7 +77,7 @@ return _this; | ||
return /*#__PURE__*/React.createElement("div", { | ||
className: "ig-instagram-items" | ||
className: styles.instagramItems | ||
}, feeds.slice(0, this.props.counter).map(function (feed, index) { | ||
return /*#__PURE__*/React.createElement("div", { | ||
key: index, | ||
className: "ig-instagram-item" | ||
className: styles.instagramItem | ||
}, /*#__PURE__*/React.createElement("a", { | ||
@@ -73,2 +90,3 @@ key: index, | ||
}, /*#__PURE__*/React.createElement("img", { | ||
className: styles.instagramImg, | ||
key: index, | ||
@@ -78,3 +96,3 @@ src: feed.media_url, | ||
}), /*#__PURE__*/React.createElement("div", { | ||
className: "instagram-count" | ||
className: styles.instagramIcon | ||
}, /*#__PURE__*/React.createElement("div", { | ||
@@ -81,0 +99,0 @@ className: "instagram-count-item" |
{ | ||
"name": "react-ig-feed", | ||
"version": "1.0.1", | ||
"description": "A React component to display a user's Instagram photos, Using Instagram Basic Display Graph API.", | ||
"version": "1.0.2", | ||
"description": "A React component to display a user's Instagram photos Using Instagram Basic Graph API", | ||
"author": "Mohammed RAJI", | ||
"license": "MIT", | ||
"repository": "https://github.com/MohammedRaji/react-ig-feed", | ||
"homepage":"https://mohammedraji.github.io/react-ig-feed/", | ||
"main": "dist/index.js", | ||
"module": "dist/index.modern.js", | ||
"source": "src/index.js", | ||
"keywords": [ | ||
"instagram", | ||
"reactjs", | ||
"react-components", | ||
"instagram-feed", | ||
"graph_api" | ||
"keywords": [ | ||
"instagram", | ||
"reactjs", | ||
"react-components", | ||
"instagram-feed", | ||
"graphapi" | ||
], | ||
@@ -19,0 +18,0 @@ "engines": { |
@@ -1,11 +0,15 @@ | ||
# react-ig-feed | ||
# react-instagram-feed | ||
 | ||
 | ||
 | ||
 | ||
[](https://standardjs.com) | ||
A React component to display a user's Instagram photos, Using Instagram Basic Display Graph API. | ||
A React component to display a user's Instagram photos Using Instagram Basic Graph API. | ||
## Demo | ||
See it in action here: https://mohammedraji.github.io/react-ig-feed/ | ||
## Install | ||
```bash | ||
@@ -19,16 +23,14 @@ npm install --save react-ig-feed | ||
import React, { Component } from 'react' | ||
import InstagramFeed from 'react-ig-feed' | ||
import React from 'react' | ||
import InstagramFeed from 'react-ig-feed' | ||
import 'react-ig-feed/dist/index.css' | ||
const App = () => { render() { | ||
return <InstagramFeed token="your_access-token" counter="8"/> | ||
} | ||
const App = () => { | ||
return <InstagramFeed token="your_access_token" counter="6"/> | ||
} | ||
export default App | ||
``` | ||
## Demo | ||
See it in action here: https://mohammedraji.github.io/react-ig-feed/ | ||
## Contributing | ||
@@ -35,0 +37,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
23817
251
44
1