UNPKG

@barcode-bakery/barcode-react

Version:
50 lines (49 loc) 1.15 kB
import { BCGdatamatrix as v } from "@barcode-bakery/barcode-datamatrix"; import { u } from "./canvas-hook-CiGCEF_R.js"; function t({ scale: f, foregroundColor: n, backgroundColor: p, offsetX: r, offsetY: F, size: M, datamatrixSize: s, quietZone: a, tilde: B, acceptECI: D, fnc1: S, encoding: m, macro: y, text: E }) { const { component: O } = u( v, (i) => { f !== void 0 && i.setScale(f), n !== void 0 && i.setForegroundColor(n), p !== void 0 && i.setBackgroundColor(p), r !== void 0 && i.setOffsetX(r), F !== void 0 && i.setOffsetY(F), M !== void 0 && i.setSize(M), s !== void 0 && i.setDataMatrixSize(s[0], s[1]), a !== void 0 && i.setQuietZoneSize(a), B !== void 0 && i.setTilde(B), D !== void 0 && i.setAcceptECI(D), S !== void 0 && i.setFNC1(S), m !== void 0 && i.setEncoding(m), y !== void 0 && i.setMacro(y), i.parse(E); }, [ f, n, p, r, F, M, s, a, B, D, S, m, y, E ] ); return O; } t.Size = v.Size; t.Encoding = v.Encoding; t.Fnc1 = v.Fnc1; t.Macro = v.Macro; export { t as BakeryDatamatrix };