react-qrcode

Qr code for react.

Downloads
13
Stars
0
Committers
1

react-qrcode

Qr code for react.

installation

npm install -S @jswork/react-qrcode

usage

  1. import css
@import "~@jswork/react-qrcode/dist/style.css";

// or use sass
@import "~@jswork/react-qrcode/dist/style.scss";
  1. import js
import ReactQRCode from '@jswork/react-qrcode';
import '@jswork/react-qrcode/dist/style.scss';

function App() {
  return (
    <div className="m-10 p-4 shadow bg-gray-100 text-gray-800 hover:shadow-md transition-all">
      <div className="badge badge-warning absolute right-0 top-0 m-4">
        Build Time: {BUILD_TIME}
      </div>
      <div className="text-center">
        <ReactQRCode value="Hello, World!" options={{ colorDark: 'black', width: 200, height: 200 }} className="inline-block" />
      </div>
    </div>
  );
}

export default App;

preview

license

Code released under the MIT license.