@swype-org/react-sdk 0.1.40 → 0.1.42
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.
- package/dist/index.cjs +10 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1480,11 +1480,16 @@ function isMobileUserAgent(userAgent) {
|
|
|
1480
1480
|
function shouldUseWalletConnector(options) {
|
|
1481
1481
|
return options.useWalletConnector ?? !isMobileUserAgent(options.userAgent);
|
|
1482
1482
|
}
|
|
1483
|
+
var FOOTER_CSS = `
|
|
1484
|
+
.swype-screen-footer {
|
|
1485
|
+
padding-bottom: max(24px, env(safe-area-inset-bottom, 24px));
|
|
1486
|
+
}`;
|
|
1483
1487
|
function ScreenLayout({ children, footer }) {
|
|
1484
1488
|
const { tokens } = useSwypeConfig();
|
|
1485
1489
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: containerStyle(tokens.bgCard), children: [
|
|
1486
1490
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: bodyStyle, children }),
|
|
1487
|
-
footer && /* @__PURE__ */ jsxRuntime.jsx("div", { style: footerStyle, children: footer })
|
|
1491
|
+
footer && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "swype-screen-footer", style: footerStyle, children: footer }),
|
|
1492
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: FOOTER_CSS })
|
|
1488
1493
|
] });
|
|
1489
1494
|
}
|
|
1490
1495
|
var containerStyle = (bg) => ({
|
|
@@ -1505,7 +1510,7 @@ var bodyStyle = {
|
|
|
1505
1510
|
flexDirection: "column"
|
|
1506
1511
|
};
|
|
1507
1512
|
var footerStyle = {
|
|
1508
|
-
padding: "16px 24px
|
|
1513
|
+
padding: "16px 24px 0",
|
|
1509
1514
|
marginTop: "auto"
|
|
1510
1515
|
};
|
|
1511
1516
|
function ScreenHeader({ title, right, onBack, badge }) {
|
|
@@ -4432,7 +4437,9 @@ function SwypePayment({
|
|
|
4432
4437
|
setMobileFlow(true);
|
|
4433
4438
|
pollingTransferIdRef.current = t.id;
|
|
4434
4439
|
polling.startPolling(t.id);
|
|
4435
|
-
|
|
4440
|
+
if (!isActiveWallet) {
|
|
4441
|
+
window.location.href = t.authorizationSessions[0].uri;
|
|
4442
|
+
}
|
|
4436
4443
|
return;
|
|
4437
4444
|
} else {
|
|
4438
4445
|
await authExecutor.executeSession(t);
|