mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-06 22:20:55 +03:00
10
app/ui/qr.js
Normal file
10
app/ui/qr.js
Normal file
@@ -0,0 +1,10 @@
|
||||
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);
|
||||
};
|
||||
Reference in New Issue
Block a user