@invoicebox/ui 0.1.0-alpha.119 → 0.1.0-alpha.120

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  import { FC } from 'react';
2
2
  export type TProps = {
3
3
  value: string;
4
+ image?: string;
4
5
  bgColor?: string;
5
6
  size?: number;
6
7
  id?: string;
@@ -6,18 +6,22 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.QRCode = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _qrcode = _interopRequireDefault(require("qrcode.react"));
9
+ var _excluded = ["image"];
9
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
11
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
11
- var invoiceboxIcon = "/public/a77a71d71b649b5aad848487ac3936b1.png";
12
- var QRCode = exports.QRCode = function QRCode(props) {
13
- return /*#__PURE__*/_react["default"].createElement(_qrcode["default"], _extends({}, props, {
12
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
13
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
14
+ var QRCode = exports.QRCode = function QRCode(_ref) {
15
+ var image = _ref.image,
16
+ others = _objectWithoutProperties(_ref, _excluded);
17
+ return /*#__PURE__*/_react["default"].createElement(_qrcode["default"], _extends({}, others, {
14
18
  renderAs: "canvas",
15
19
  level: "M",
16
- imageSettings: {
17
- src: invoiceboxIcon,
20
+ imageSettings: image ? {
21
+ src: image,
18
22
  height: 39,
19
23
  width: 39,
20
24
  excavate: false
21
- }
25
+ } : undefined
22
26
  }));
23
27
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invoicebox/ui",
3
- "version": "0.1.0-alpha.119",
3
+ "version": "0.1.0-alpha.120",
4
4
  "description": "Invoicebox UI",
5
5
  "license": "Apache License 2.0",
6
6
  "scripts": {
@@ -32,7 +32,6 @@
32
32
  "@storybook/test": "^7.6.13",
33
33
  "@typescript-eslint/eslint-plugin": "^5.62.0",
34
34
  "@typescript-eslint/parser": "^5.62.0",
35
- "babel-plugin-file-loader": "^2.0.0",
36
35
  "babel-plugin-inline-json-import": "^0.3.2",
37
36
  "babel-plugin-styled-components": "^2.1.4",
38
37
  "eslint": "^8.56.0",