1
0
mirror of https://gitlab.com/timvisee/send.git synced 2024-11-10 13:13:00 +01:00
send/app/ui/qr.js

11 lines
245 B
JavaScript
Raw Normal View History

const raw = require('choo/html/raw');
const qrcode = require('../qrcode');
module.exports = function(url) {
const gen = qrcode(5, 'L');
gen.addData(url);
gen.make();
const qr = gen.createSvgTag({ scalable: true });
return raw(qr);
};