coinley-checkout 0.2.2 → 0.2.4

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.
@@ -1106,25 +1106,33 @@ const CoinleyProvider = ({
1106
1106
  };
1107
1107
  return /* @__PURE__ */ jsxRuntimeExports.jsx(CoinleyContext.Provider, { value, children });
1108
1108
  };
1109
- const QRCode = ({ walletAddress, amount, currency }) => {
1110
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
1111
- /* @__PURE__ */ jsxRuntimeExports.jsx(
1109
+ const QRCode = ({
1110
+ walletAddress,
1111
+ amount,
1112
+ currency,
1113
+ theme = "light"
1114
+ }) => {
1115
+ const qrCodeUrl = `https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl=${encodeURIComponent(`${currency}:${walletAddress}?amount=${amount}`)}&choe=UTF-8`;
1116
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center", children: [
1117
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 rounded-lg bg-white mb-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1112
1118
  "img",
1113
1119
  {
1114
- src: `https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl=Payment%20to%20${walletAddress}&choe=UTF-8`,
1115
- alt: "Payment QR Code",
1116
- style: { width: 200, height: 200, margin: "0 auto", display: "block" }
1120
+ src: qrCodeUrl,
1121
+ alt: `QR Code for ${currency} payment`,
1122
+ width: "200",
1123
+ height: "200"
1117
1124
  }
1118
- ),
1119
- /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { style: { textAlign: "center", marginTop: 10 }, children: [
1120
- "Scan to pay ",
1121
- amount,
1122
- " ",
1123
- currency
1124
- ] }),
1125
- /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { style: { marginTop: 10 }, children: [
1126
- "Send to: ",
1127
- walletAddress
1125
+ ) }),
1126
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center text-sm text-gray-700", children: "Scan with your wallet app to pay" }),
1127
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-3 w-full", children: [
1128
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-gray-500 mb-1", children: [
1129
+ "Send ",
1130
+ amount,
1131
+ " ",
1132
+ currency,
1133
+ " to:"
1134
+ ] }),
1135
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-mono p-2 rounded overflow-auto break-all bg-gray-100 text-gray-700", children: walletAddress })
1128
1136
  ] })
1129
1137
  ] });
1130
1138
  };