qr-code-react
==========
This is an npm module ported from HERE to work for React.
This was to fix the issues involving dangerouslySetInnerHTML
.
Examples
;// Inside a react component:{return<div className="App"><QRcodeReactclassName="LOL"value="Hello World!"margin=40size=10codeType=4errorLevel="M"color="#000000"bgColor="#FFFFFF"/></div>;}// Or just use the original code:let qr = ;qr;qr;qr; // creates an <img> tag as textqr; // creates a <table> tag as text
Details
static propTypes =className: PropTypesstringisRequiredmargin: PropTypesnumbersize: PropTypesnumbercodeType: PropTypesnumbererrorLevel: PropTypesstringvalue: PropTypesstringisRequiredcolor: PropTypesstringbgColor: PropTypesstring;static defaultProps =margin: 2size: 4codeType: 4errorLevel: "M"color: "#000000"bgColor: "#FFFFFF";
- typeNumber: 1 to 10
- errorCorrectLevel: 'L','M','Q','H'
Install
npm install qr-code-react
NOTICE
The word "QR Code" is registered trademark of DENSO WAVE INCORPORATED