From 2052735de66c45bd054c558972ba2ad84dc9033d Mon Sep 17 00:00:00 2001 From: Dan Homola Date: Tue, 20 Jun 2017 21:24:35 +0200 Subject: [PATCH] fix: remove size prop deprecation warning --- src/components/qr-svg.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) 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) => (