diff --git a/src/components/qr-svg.js b/src/components/qr-svg.js index 78f67329..49c45d10 100644 --- a/src/components/qr-svg.js +++ b/src/components/qr-svg.js @@ -4,22 +4,13 @@ import PropTypes from 'prop-types'; const QRCodeImpl = require('qr.js/lib/QRCode'); const ErrorCorrectLevel = require('qr.js/lib/ErrorCorrectLevel'); -let warningFired = false; - export function QRCode({ value = '', - size, level = 'L', bgColor = '#FFFFFF', fgColor = '#000000', ...otherProps } = {}) { - if (size && !warningFired) { - /* eslint-disable no-console */ - console.warn('The \'size\' prop is deprecated and will be removed in the next major version. Please use the \'style\', \'className\' or \'width\' props to size the code.'); - /* eslint-enable no-console */ - warningFired = true; - } // adapted from https://github.com/zpao/qrcode.react/blob/master/src/index.js const qrcode = new QRCodeImpl(-1, ErrorCorrectLevel[level]); qrcode.addData(value); @@ -27,7 +18,7 @@ export function QRCode({ const cells = qrcode.modules; - return ( + return ( { cells.map((row, rowIndex) => row.map((cell, colIndex) => (