react-image-carousel
Advanced tools
Comparing version 2.0.4 to 2.0.5
{ | ||
"name": "react-image-carousel-example", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"start": "npm-run-all --parallel open:src lint:watch", | ||
"open:src": "babel-node tools/srcServer.js", | ||
"lint": "node_modules/.bin/esw webpack.config.* src tools", | ||
"lint:watch": "npm run lint -- --watch", | ||
"build": "babel-node tools/build.js" | ||
}, | ||
"author": "Ching-Ching Yeh <learningg@gmail.com> (https://github.com/Grace951)", | ||
"license": "MIT", | ||
"dependencies": { | ||
"react": "^16.4.0", | ||
"react-transition-group": "^2.3.1", | ||
"react-dom": "^16.4.0", | ||
"react-image-carousel": "^2.0.4", | ||
"prop-types": "^15.6.1" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.18.0", | ||
"babel-core": "^6.18.2", | ||
"babel-eslint": "^7.1.0", | ||
"babel-loader": "^6.2.7", | ||
"babel-plugin-react-display-name": "^2.0.0", | ||
"babel-preset-es2015": "^6.18.0", | ||
"babel-preset-react": "^6.16.0", | ||
"babel-preset-react-hmre": "^1.1.1", | ||
"babel-preset-stage-0": "^6.16.0", | ||
"babel-register": "^6.18.0", | ||
"colors": "^1.1.2", | ||
"compression": "^1.6.2", | ||
"cross-env": "^3.1.3", | ||
"css-loader": "^0.25.0", | ||
"enzyme": "^2.6.0", | ||
"eslint": "^3.9.1", | ||
"eslint-plugin-import": "^2.2.0", | ||
"eslint-plugin-react": "^6.6.0", | ||
"eslint-watch": "^2.1.14", | ||
"eventsource-polyfill": "^0.9.6", | ||
"expect": "^1.20.2", | ||
"express": "^4.14.0", | ||
"extract-text-webpack-plugin": "^1.0.1", | ||
"file-loader": "^0.9.0", | ||
"font-awesome": "^4.7.0", | ||
"font-awesome-sass-loader": "^1.0.2", | ||
"html-webpack-plugin": "^2.24.1", | ||
"image-webpack-loader": "^3.0.0", | ||
"jsdom": "^9.8.3", | ||
"json-loader": "^0.5.4", | ||
"node-sass": "^4.5.3", | ||
"npm-run-all": "^3.1.1", | ||
"open": "0.0.5", | ||
"resolve-url-loader": "^1.6.0", | ||
"rimraf": "^2.5.4", | ||
"sass-loader": "^4.0.2", | ||
"style-loader": "^0.13.1", | ||
"webpack": "^1.13.3", | ||
"webpack-dev-middleware": "^1.8.4", | ||
"webpack-hot-middleware": "^2.13.2" | ||
} | ||
"name": "react-image-carousel-example", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"start": "npm-run-all --parallel open:src lint:watch", | ||
"open:src": "babel-node tools/srcServer.js", | ||
"lint": "node_modules/.bin/esw webpack.config.* src tools", | ||
"lint:watch": "npm run lint -- --watch", | ||
"build": "babel-node tools/build.js" | ||
}, | ||
"author": "Ching-Ching Yeh <learningg@gmail.com> (https://github.com/Grace951)", | ||
"license": "MIT", | ||
"dependencies": { | ||
"react": "^16.4.0", | ||
"react-transition-group": "^2.3.1", | ||
"react-dom": "^16.4.0", | ||
"react-image-carousel": "^2.0.5", | ||
"prop-types": "^15.6.1" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.18.0", | ||
"babel-core": "^6.18.2", | ||
"babel-eslint": "^7.1.0", | ||
"babel-loader": "^6.2.7", | ||
"babel-plugin-react-display-name": "^2.0.0", | ||
"babel-preset-es2015": "^6.18.0", | ||
"babel-preset-react": "^6.16.0", | ||
"babel-preset-react-hmre": "^1.1.1", | ||
"babel-preset-stage-0": "^6.16.0", | ||
"babel-register": "^6.18.0", | ||
"colors": "^1.1.2", | ||
"compression": "^1.6.2", | ||
"cross-env": "^3.1.3", | ||
"css-loader": "^0.25.0", | ||
"enzyme": "^2.6.0", | ||
"eslint": "^3.9.1", | ||
"eslint-plugin-import": "^2.2.0", | ||
"eslint-plugin-react": "^6.6.0", | ||
"eslint-watch": "^2.1.14", | ||
"eventsource-polyfill": "^0.9.6", | ||
"expect": "^1.20.2", | ||
"express": "^4.14.0", | ||
"extract-text-webpack-plugin": "^1.0.1", | ||
"file-loader": "^0.9.0", | ||
"font-awesome": "^4.7.0", | ||
"font-awesome-sass-loader": "^1.0.2", | ||
"html-webpack-plugin": "^2.24.1", | ||
"image-webpack-loader": "^3.0.0", | ||
"jsdom": "^9.8.3", | ||
"json-loader": "^0.5.4", | ||
"node-sass": "^4.9.0", | ||
"npm-run-all": "^3.1.1", | ||
"open": "0.0.5", | ||
"resolve-url-loader": "^1.6.0", | ||
"rimraf": "^2.5.4", | ||
"sass-loader": "^4.0.2", | ||
"style-loader": "^0.13.1", | ||
"webpack": "^1.13.3", | ||
"webpack-dev-middleware": "^1.8.4", | ||
"webpack-hot-middleware": "^2.13.2" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -10,10 +10,6 @@ Object.defineProperty(exports, "__esModule", { | ||
var _react = require('react'); | ||
var _react = require("react"); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -42,3 +38,3 @@ | ||
_createClass(Footer, [{ | ||
key: 'getActiveStyle', | ||
key: "getActiveStyle", | ||
value: function getActiveStyle(id) { | ||
@@ -49,3 +45,3 @@ var s = { | ||
if (this.props.thumb) { | ||
s.backgroundImage = 'url( ' + this.props.images[id] + ')'; | ||
s.backgroundImage = "url( " + this.props.images[id] + ")"; | ||
} | ||
@@ -55,3 +51,3 @@ return s; | ||
}, { | ||
key: 'getFooterStyle', | ||
key: "getFooterStyle", | ||
value: function getFooterStyle() { | ||
@@ -65,3 +61,3 @@ var s = {}; | ||
}, { | ||
key: 'changeCurrent', | ||
key: "changeCurrent", | ||
value: function changeCurrent(e) { | ||
@@ -72,3 +68,3 @@ var id = parseInt(e.target.getAttribute("data-id")); | ||
}, { | ||
key: 'render', | ||
key: "render", | ||
value: function render() { | ||
@@ -79,9 +75,9 @@ var _this2 = this; | ||
return _react2.default.createElement( | ||
'div', | ||
{ className: 'carousel-footer', style: this.getFooterStyle() }, | ||
"div", | ||
{ className: "carousel-footer", style: this.getFooterStyle() }, | ||
_react2.default.createElement( | ||
'div', | ||
{ className: 'box' }, | ||
"div", | ||
{ className: "box" }, | ||
this.props.images.map(function (item, id) { | ||
return _react2.default.createElement('div', { className: footerClass, key: id, 'data-id': id, style: _this2.getActiveStyle(id), onClick: _this2.changeCurrent }); | ||
return _react2.default.createElement("div", { className: footerClass, key: id, "data-id": id, style: _this2.getActiveStyle(id), onClick: _this2.changeCurrent }); | ||
}) | ||
@@ -97,8 +93,8 @@ ) | ||
Footer.propTypes = { | ||
images: _propTypes2.default.array.isRequired, | ||
thumb: _propTypes2.default.bool, | ||
currentId: _propTypes2.default.number, | ||
setCurrent: _propTypes2.default.func.isRequired | ||
images: PropTypes.array.isRequired, | ||
thumb: PropTypes.bool, | ||
currentId: PropTypes.number, | ||
setCurrent: PropTypes.func.isRequired | ||
}; | ||
exports.Footer = Footer; |
@@ -130,3 +130,3 @@ 'use strict'; | ||
), | ||
_react2.default.createElement(_Footer.Footer, { images: images, currentId: this.state.currentId, setCurrent: this.setCurrent, dots: images.length, thumb: thumb }) | ||
_react2.default.createElement(_Footer.Footer, { images: images, currentId: this.state.currentId, setCurrent: this.setCurrent, thumb: this.props.thumb }) | ||
); | ||
@@ -133,0 +133,0 @@ } |
{ | ||
"name": "react-image-carousel", | ||
"version": "2.0.4", | ||
"description": "simple react image carousel", | ||
"main": "lib/ReactImageCarousel.js", | ||
"scripts": { | ||
"compile": "babel -d lib/ src/ && copyfiles -f src/main.min.css lib/css", | ||
"prepare": "npm run compile" | ||
"_from": "react-image-carousel@^2.0.4", | ||
"_id": "react-image-carousel@2.0.4", | ||
"_inBundle": false, | ||
"_integrity": "sha512-sWSfaT1qWu89T/3IHEdai6jh/0RJr+iYqRO1JSgOvAxClCGYfMkkfTzGWSZcH6T9p87sFeGvlb8ki+Ffy70aHQ==", | ||
"_location": "/react-image-carousel", | ||
"_phantomChildren": {}, | ||
"_requested": { | ||
"type": "range", | ||
"registry": true, | ||
"raw": "react-image-carousel@^2.0.4", | ||
"name": "react-image-carousel", | ||
"escapedName": "react-image-carousel", | ||
"rawSpec": "^2.0.4", | ||
"saveSpec": null, | ||
"fetchSpec": "^2.0.4" | ||
}, | ||
"keywords": [ | ||
"react", | ||
"image", | ||
"carousel", | ||
"responsive" | ||
"_requiredBy": [ | ||
"/" | ||
], | ||
"author": "Ching-Ching Yeh <learningg@gmail.com> (https://github.com/Grace951)", | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"react": "^16.4.0", | ||
"react-transition-group": "^2.3.1", | ||
"prop-types": "^15.6.1" | ||
"_resolved": "https://registry.npmjs.org/react-image-carousel/-/react-image-carousel-2.0.4.tgz", | ||
"_shasum": "82fb1fa4a3fea1732201e8d7119ca0a78c2f4cb4", | ||
"_spec": "react-image-carousel@^2.0.4", | ||
"_where": "D:\\ChingChing\\project\\react-image-carousel0\\example\\example2", | ||
"author": { | ||
"name": "Ching-Ching Yeh", | ||
"email": "learningg@gmail.com", | ||
"url": "https://github.com/Grace951" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/Grace951/react-image-carousel/issues" | ||
}, | ||
"bundleDependencies": false, | ||
"deprecated": false, | ||
"description": "simple react image carousel", | ||
"devDependencies": { | ||
@@ -35,2 +48,17 @@ "babel-cli": "^6.10.1", | ||
}, | ||
"homepage": "https://github.com/Grace951/react-image-carousel", | ||
"keywords": [ | ||
"react", | ||
"image", | ||
"carousel", | ||
"responsive" | ||
], | ||
"license": "MIT", | ||
"main": "lib/ReactImageCarousel.js", | ||
"name": "react-image-carousel", | ||
"peerDependencies": { | ||
"react": "^16.4.0", | ||
"react-transition-group": "^2.3.1", | ||
"prop-types": "^15.6.1" | ||
}, | ||
"repository": { | ||
@@ -40,6 +68,7 @@ "type": "git", | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/Grace951/react-image-carousel/issues" | ||
"scripts": { | ||
"compile": "babel -d lib/ src/ && copyfiles -f src/main.min.css lib/css", | ||
"prepare": "npm run compile" | ||
}, | ||
"homepage": "https://github.com/Grace951/react-image-carousel" | ||
"version": "2.0.5" | ||
} |
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
@@ -4,0 +3,0 @@ class Footer extends React.Component{ |
@@ -70,9 +70,9 @@ import React from 'react'; | ||
<Fade key={this.state.currentId}> | ||
<img src={cImage} key={cImage} /> | ||
<img src={cImage} key={cImage} /> | ||
</Fade> | ||
</TransitionGroup> | ||
</div> | ||
<Footer images={images} currentId={this.state.currentId} setCurrent={this.setCurrent} dots={images.length} thumb={thumb}/> | ||
<Footer images={images} currentId={this.state.currentId} setCurrent={this.setCurrent} thumb={this.props.thumb}/> | ||
</div> | ||
); | ||
); | ||
} | ||
@@ -79,0 +79,0 @@ } |
4346399
1336