@swype-org/react-sdk 0.1.211 → 0.1.213
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 +27 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +27 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2510,20 +2510,32 @@ var rowStyle = {
|
|
|
2510
2510
|
alignItems: "center",
|
|
2511
2511
|
gap: 6
|
|
2512
2512
|
};
|
|
2513
|
-
function PrimaryButton({ children, onClick, disabled, loading, icon }) {
|
|
2513
|
+
function PrimaryButton({ children, onClick, href, disabled, loading, icon }) {
|
|
2514
2514
|
const { tokens } = useBlinkConfig();
|
|
2515
2515
|
const isDisabled = disabled || loading;
|
|
2516
|
-
|
|
2516
|
+
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2517
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { style: iconWrapStyle, children: icon }),
|
|
2518
|
+
loading ? "Please wait..." : children
|
|
2519
|
+
] });
|
|
2520
|
+
if (href && !isDisabled) {
|
|
2521
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2522
|
+
"a",
|
|
2523
|
+
{
|
|
2524
|
+
href,
|
|
2525
|
+
onClick,
|
|
2526
|
+
style: linkButtonStyle(tokens),
|
|
2527
|
+
children: content
|
|
2528
|
+
}
|
|
2529
|
+
);
|
|
2530
|
+
}
|
|
2531
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2517
2532
|
"button",
|
|
2518
2533
|
{
|
|
2519
2534
|
type: "button",
|
|
2520
2535
|
onClick,
|
|
2521
2536
|
disabled: isDisabled,
|
|
2522
2537
|
style: buttonStyle(tokens, isDisabled),
|
|
2523
|
-
children:
|
|
2524
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { style: iconWrapStyle, children: icon }),
|
|
2525
|
-
loading ? "Please wait..." : children
|
|
2526
|
-
]
|
|
2538
|
+
children: content
|
|
2527
2539
|
}
|
|
2528
2540
|
);
|
|
2529
2541
|
}
|
|
@@ -2546,6 +2558,10 @@ var buttonStyle = (tokens, disabled) => ({
|
|
|
2546
2558
|
justifyContent: "center",
|
|
2547
2559
|
gap: 8
|
|
2548
2560
|
});
|
|
2561
|
+
var linkButtonStyle = (tokens) => ({
|
|
2562
|
+
...buttonStyle(tokens, false),
|
|
2563
|
+
textDecoration: "none"
|
|
2564
|
+
});
|
|
2549
2565
|
var iconWrapStyle = {
|
|
2550
2566
|
display: "flex",
|
|
2551
2567
|
alignItems: "center"
|
|
@@ -4983,10 +4999,13 @@ function OpenWalletScreen({
|
|
|
4983
4999
|
{
|
|
4984
5000
|
footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: footerContentStyle, children: [
|
|
4985
5001
|
error && /* @__PURE__ */ jsxRuntime.jsx(InfoBanner, { children: error }),
|
|
4986
|
-
!loading && /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { onClick: handleOpen, children: [
|
|
5002
|
+
!loading && (isCustomSchemeUri(deeplinkUri) ? /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { onClick: handleOpen, children: [
|
|
4987
5003
|
"Open ",
|
|
4988
5004
|
displayName
|
|
4989
|
-
] }),
|
|
5005
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { href: deeplinkUri, children: [
|
|
5006
|
+
"Open ",
|
|
5007
|
+
displayName
|
|
5008
|
+
] })),
|
|
4990
5009
|
error && onRetryStatus && /* @__PURE__ */ jsxRuntime.jsx(OutlineButton, { onClick: onRetryStatus, children: "Retry status check" }),
|
|
4991
5010
|
/* @__PURE__ */ jsxRuntime.jsx("p", { style: hintStyle(tokens.textMuted), children: loading ? "Preparing authorization..." : error ? "Retry the status check after returning to the browser, or reopen your wallet if needed." : "If your wallet didn't open automatically, tap the button above" }),
|
|
4992
5011
|
/* @__PURE__ */ jsxRuntime.jsx(PoweredByFooter, {})
|