react-qr-code
Advanced tools
Comparing version 0.0.1-rc.5 to 0.0.1-rc.6
@@ -6,3 +6,2 @@ 'use strict'; | ||
}); | ||
exports.QRCode = undefined; | ||
@@ -62,3 +61,3 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var QRCode = exports.QRCode = function (_React$Component) { | ||
var QRCode = function (_React$Component) { | ||
_inherits(QRCode, _React$Component); | ||
@@ -69,3 +68,3 @@ | ||
return _possibleConstructorReturn(this, Object.getPrototypeOf(QRCode).apply(this, arguments)); | ||
return _possibleConstructorReturn(this, (QRCode.__proto__ || Object.getPrototypeOf(QRCode)).apply(this, arguments)); | ||
} | ||
@@ -143,3 +142,6 @@ | ||
exports.default = QRCode; | ||
QRCode.propTypes = propTypes; | ||
QRCode.defaultProps = defaultProps; |
@@ -6,7 +6,9 @@ 'use strict'; | ||
}); | ||
exports.QRCode = undefined; | ||
var _QRCode = require('./components/QRCode'); | ||
exports.QRCode = _QRCode.QRCode; | ||
exports.default = _QRCode.QRCode; | ||
var _QRCode2 = _interopRequireDefault(_QRCode); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
exports.default = _QRCode2.default; |
{ | ||
"name": "react-qr-code", | ||
"version": "0.0.1-rc.5", | ||
"version": "0.0.1-rc.6", | ||
"description": "A <QRCode /> component for React.", | ||
@@ -31,3 +31,2 @@ "keywords": [ | ||
"dependencies": { | ||
"autobind-decorator": "^1.3.3", | ||
"qr.js": "0.0.0", | ||
@@ -41,19 +40,18 @@ "react-addons-shallow-compare": "^15.2.1" | ||
"babel": "^6.3.26", | ||
"babel-cli": "^6.10.1", | ||
"babel-core": "^6.10.4", | ||
"babel-cli": "^6.14.0", | ||
"babel-core": "^6.14.0", | ||
"babel-eslint": "^6.1.2", | ||
"babel-loader": "^6.2.1", | ||
"babel-plugin-transform-decorators-legacy": "^1.3.4", | ||
"babel-loader": "^6.2.5", | ||
"babel-plugin-transform-object-rest-spread": "^6.8.0", | ||
"babel-preset-es2015": "^6.9.0", | ||
"babel-preset-es2015": "^6.14.0", | ||
"babel-preset-react": "^6.11.1", | ||
"eslint": "^2.13.1", | ||
"eslint-config-airbnb": "^9.0.1", | ||
"eslint-plugin-import": "^1.10.2", | ||
"eslint-plugin-jsx-a11y": "^1.5.5", | ||
"eslint-plugin-react": "^5.2.2", | ||
"rimraf": "^2.5.3", | ||
"webpack": "^1.13.1", | ||
"webpack-dev-server": "^1.14.1" | ||
"eslint": "^3.4.0", | ||
"eslint-config-airbnb": "^10.0.1", | ||
"eslint-plugin-import": "^1.14.0", | ||
"eslint-plugin-jsx-a11y": "^2.2.1", | ||
"eslint-plugin-react": "^6.2.0", | ||
"rimraf": "^2.5.4", | ||
"webpack": "^1.13.2", | ||
"webpack-dev-server": "^1.15.1" | ||
} | ||
} |
@@ -7,3 +7,3 @@ # react-qr-code | ||
Library for generation of harmonious color themes. Include react components for picking colors. | ||
A <QRCode /> component for React. This library suppose to work with React and React Native (wasn't tested). | ||
@@ -22,7 +22,21 @@ ### Installation | ||
import React from 'react'; | ||
import ReactART from 'react-art'; | ||
import Rectangle from 'react-art/lib/Rectangle.art'; | ||
import ReactDOM from 'react-dom'; | ||
import QRCode from 'react-qr-code'; | ||
React.render( | ||
<QRCode value="http://facebook.github.io/react/" />, | ||
document.getElementById('Container') | ||
// create a HOC for web | ||
const getQRCodeHOC = (QRCodeComponent) ⇒ ((props) => ( | ||
<QRCodeComponent | ||
Rectangle={Rectangle} | ||
Surface={ReactART.Surface} | ||
Transform={ReactART.Transform} | ||
{...props} | ||
/> | ||
)); | ||
const QRCodeHOC = getQRCodeHOC(QRCode); | ||
ReactDOM.render( | ||
<QRCodeHOC value="hey" />, | ||
document.getElementById('Container') | ||
); | ||
@@ -33,9 +47,12 @@ ``` | ||
prop | type | default value | ||
----------|----------------------|-------------- | ||
`value` | `string` | | ||
`size` | `number` | `128` | ||
`bgColor` | `string` (CSS color) | `"#FFFFFF"` | ||
`fgColor` | `string` (CSS color) | `"#000000"` | ||
`level` | `string` (`'L' 'M' 'Q' 'H'`) | `'L'` | ||
prop | type | default value | ||
------------|------------------------------|-------------- | ||
`Rectangle` | `func` | | ||
`Surface` | `func` | | ||
`Transform` | `func` | | ||
`value` | `string` | | ||
`size` | `number` | `128` | ||
`bgColor` | `string` (CSS color) | `"#FFFFFF"` | ||
`fgColor` | `string` (CSS color) | `"#000000"` | ||
`level` | `string` (`'L' 'M' 'Q' 'H'`) | `'L'` | ||
@@ -46,8 +63,4 @@ ### Examples | ||
### Web site | ||
http://opensource-cards.github.io/react-qr-code | ||
### License | ||
MIT |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10548
3
16
63
- Removedautobind-decorator@^1.3.3
- Removedautobind-decorator@1.4.3(transitive)