# j-QRCode

> Ten element tworzy kod QR, który zawiera [Książka QRC](https://davidshimjs.github.io/qrcodejs/).

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: pl
Content-SHA256: b4a0f4a0fe992a5db90b29ae5100251857c91e28c697eff3395b361fd1681a30
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

Ten element tworzy kod QR, który zawiera [Książka QRC](https://davidshimjs.github.io/qrcodejs/).


__Konfiguracja__:

- `width {Number}` standardowy widok obrazu (default: `128`)
- `height {Number}` Podstawowy rozmiar obrazu (default image height): `128`)
- `fg {String}` kolor przedni (default: `#000000`)
- `bg {String}` - kolor tła (default: `#FFFFFF`)
- `delay {Number}` małe opóźnienie w generowaniu kodu (default: `200`)

__Jak tworzyć kod QR?__

```js
var opt = {};
opt.text = 'https://www.totaljs.com';
// opt.width {Number}
// opt.height {Number}
// opt.fg {String}
// opt.bg {String}
opt.callback = function(base64) {
	console.log(base64);
};
SETTER('qrcode/create', opt);
```

Użyj go z `<ui-component name="qrcode">`Gdy element nie jest jeszcze ładowany, jComponent Pobierz go po pierwszym użyciu z adresu `DEF.fallback` (Wydaje się Componentator Autor: Peter Širka Źródło: Componentator Zestaw składników, licencja MIT.

```html example.html
<ui-component name="qrcode" config="width:200;height:200"></ui-component>

<script>

	ON('ready', function() {
		var opt = {};
		opt.text = 'https://totaljs.com';
		opt.callback = function(base64) {
			var img = document.createElement('IMG');
			img.setAttribute('src', base64);
			document.body.append(img);
		};
		SETTER('qrcode/create', opt);
	});

</script>
```
