@swype-org/react-sdk 0.1.213 → 0.1.214
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 +8 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.js +8 -27
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -665,14 +665,12 @@ declare function PoweredByFooter(): react_jsx_runtime.JSX.Element;
|
|
|
665
665
|
interface PrimaryButtonProps {
|
|
666
666
|
children: ReactNode;
|
|
667
667
|
onClick?: () => void;
|
|
668
|
-
/** When set, renders as an `<a>` tag instead of `<button>`. */
|
|
669
|
-
href?: string;
|
|
670
668
|
disabled?: boolean;
|
|
671
669
|
loading?: boolean;
|
|
672
670
|
/** Optional icon element rendered left of the label */
|
|
673
671
|
icon?: ReactNode;
|
|
674
672
|
}
|
|
675
|
-
declare function PrimaryButton({ children, onClick,
|
|
673
|
+
declare function PrimaryButton({ children, onClick, disabled, loading, icon }: PrimaryButtonProps): react_jsx_runtime.JSX.Element;
|
|
676
674
|
|
|
677
675
|
interface OutlineButtonProps {
|
|
678
676
|
children: ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -665,14 +665,12 @@ declare function PoweredByFooter(): react_jsx_runtime.JSX.Element;
|
|
|
665
665
|
interface PrimaryButtonProps {
|
|
666
666
|
children: ReactNode;
|
|
667
667
|
onClick?: () => void;
|
|
668
|
-
/** When set, renders as an `<a>` tag instead of `<button>`. */
|
|
669
|
-
href?: string;
|
|
670
668
|
disabled?: boolean;
|
|
671
669
|
loading?: boolean;
|
|
672
670
|
/** Optional icon element rendered left of the label */
|
|
673
671
|
icon?: ReactNode;
|
|
674
672
|
}
|
|
675
|
-
declare function PrimaryButton({ children, onClick,
|
|
673
|
+
declare function PrimaryButton({ children, onClick, disabled, loading, icon }: PrimaryButtonProps): react_jsx_runtime.JSX.Element;
|
|
676
674
|
|
|
677
675
|
interface OutlineButtonProps {
|
|
678
676
|
children: ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -2507,32 +2507,20 @@ var rowStyle = {
|
|
|
2507
2507
|
alignItems: "center",
|
|
2508
2508
|
gap: 6
|
|
2509
2509
|
};
|
|
2510
|
-
function PrimaryButton({ children, onClick,
|
|
2510
|
+
function PrimaryButton({ children, onClick, disabled, loading, icon }) {
|
|
2511
2511
|
const { tokens } = useBlinkConfig();
|
|
2512
2512
|
const isDisabled = disabled || loading;
|
|
2513
|
-
|
|
2514
|
-
icon && /* @__PURE__ */ jsx("span", { style: iconWrapStyle, children: icon }),
|
|
2515
|
-
loading ? "Please wait..." : children
|
|
2516
|
-
] });
|
|
2517
|
-
if (href && !isDisabled) {
|
|
2518
|
-
return /* @__PURE__ */ jsx(
|
|
2519
|
-
"a",
|
|
2520
|
-
{
|
|
2521
|
-
href,
|
|
2522
|
-
onClick,
|
|
2523
|
-
style: linkButtonStyle(tokens),
|
|
2524
|
-
children: content
|
|
2525
|
-
}
|
|
2526
|
-
);
|
|
2527
|
-
}
|
|
2528
|
-
return /* @__PURE__ */ jsx(
|
|
2513
|
+
return /* @__PURE__ */ jsxs(
|
|
2529
2514
|
"button",
|
|
2530
2515
|
{
|
|
2531
2516
|
type: "button",
|
|
2532
2517
|
onClick,
|
|
2533
2518
|
disabled: isDisabled,
|
|
2534
2519
|
style: buttonStyle(tokens, isDisabled),
|
|
2535
|
-
children:
|
|
2520
|
+
children: [
|
|
2521
|
+
icon && /* @__PURE__ */ jsx("span", { style: iconWrapStyle, children: icon }),
|
|
2522
|
+
loading ? "Please wait..." : children
|
|
2523
|
+
]
|
|
2536
2524
|
}
|
|
2537
2525
|
);
|
|
2538
2526
|
}
|
|
@@ -2555,10 +2543,6 @@ var buttonStyle = (tokens, disabled) => ({
|
|
|
2555
2543
|
justifyContent: "center",
|
|
2556
2544
|
gap: 8
|
|
2557
2545
|
});
|
|
2558
|
-
var linkButtonStyle = (tokens) => ({
|
|
2559
|
-
...buttonStyle(tokens, false),
|
|
2560
|
-
textDecoration: "none"
|
|
2561
|
-
});
|
|
2562
2546
|
var iconWrapStyle = {
|
|
2563
2547
|
display: "flex",
|
|
2564
2548
|
alignItems: "center"
|
|
@@ -4996,13 +4980,10 @@ function OpenWalletScreen({
|
|
|
4996
4980
|
{
|
|
4997
4981
|
footer: /* @__PURE__ */ jsxs("div", { style: footerContentStyle, children: [
|
|
4998
4982
|
error && /* @__PURE__ */ jsx(InfoBanner, { children: error }),
|
|
4999
|
-
!loading &&
|
|
4983
|
+
!loading && /* @__PURE__ */ jsxs(PrimaryButton, { onClick: handleOpen, children: [
|
|
5000
4984
|
"Open ",
|
|
5001
4985
|
displayName
|
|
5002
|
-
] })
|
|
5003
|
-
"Open ",
|
|
5004
|
-
displayName
|
|
5005
|
-
] })),
|
|
4986
|
+
] }),
|
|
5006
4987
|
error && onRetryStatus && /* @__PURE__ */ jsx(OutlineButton, { onClick: onRetryStatus, children: "Retry status check" }),
|
|
5007
4988
|
/* @__PURE__ */ 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" }),
|
|
5008
4989
|
/* @__PURE__ */ jsx(PoweredByFooter, {})
|