@matchain/matchid-sdk-react 0.1.32 → 0.1.34
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.css +3 -0
- package/dist/index.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +19 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -6
- package/dist/index.mjs.map +1 -1
- package/example/src/components/Login/index.tsx +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1896,6 +1896,7 @@ function StepVerify(props) {
|
|
|
1896
1896
|
placeholder: intl.formatMessage({
|
|
1897
1897
|
id: "codePlaceholder"
|
|
1898
1898
|
}),
|
|
1899
|
+
className: "matchid-email-verify-field",
|
|
1899
1900
|
maxLength: codeLength,
|
|
1900
1901
|
onChange: (e) => setCode(e.target.value),
|
|
1901
1902
|
value: code,
|
|
@@ -2042,6 +2043,7 @@ function LoginBox({
|
|
|
2042
2043
|
"telegram",
|
|
2043
2044
|
"twitter"
|
|
2044
2045
|
],
|
|
2046
|
+
walletMethods = ["evm"],
|
|
2045
2047
|
inModal = false
|
|
2046
2048
|
}) {
|
|
2047
2049
|
const [emailOpen, setEmailOpen] = useState9(false);
|
|
@@ -2103,20 +2105,20 @@ function LoginBox({
|
|
|
2103
2105
|
onClick: () => login("youtube")
|
|
2104
2106
|
}
|
|
2105
2107
|
};
|
|
2106
|
-
const
|
|
2107
|
-
{
|
|
2108
|
+
const walletMap = {
|
|
2109
|
+
evm: {
|
|
2108
2110
|
icon: /* @__PURE__ */ jsx46(EVMDarkIcon, {}),
|
|
2109
2111
|
activeIcon: /* @__PURE__ */ jsx46(EVMLightIcon, {}),
|
|
2110
2112
|
name: "EVM",
|
|
2111
2113
|
onClick: () => login("evm")
|
|
2112
2114
|
},
|
|
2113
|
-
{
|
|
2115
|
+
sol: {
|
|
2114
2116
|
icon: /* @__PURE__ */ jsx46(SOLDarkIcon, {}),
|
|
2115
2117
|
activeIcon: /* @__PURE__ */ jsx46(SOLLightIcon, {}),
|
|
2116
2118
|
name: "SOL",
|
|
2117
2119
|
onClick: () => login("sol")
|
|
2118
2120
|
}
|
|
2119
|
-
|
|
2121
|
+
};
|
|
2120
2122
|
return /* @__PURE__ */ jsxs31(Fragment2, { children: [
|
|
2121
2123
|
(!inModal || !emailOpen) && /* @__PURE__ */ jsxs31("div", { className: "matchid-login-box", children: [
|
|
2122
2124
|
/* @__PURE__ */ jsx46("div", { className: "matchid-login-recommend-list", children: recommendMethods.map((m) => {
|
|
@@ -2129,7 +2131,8 @@ function LoginBox({
|
|
|
2129
2131
|
showChildren: m == "wallet" && showWallet,
|
|
2130
2132
|
children: m == "wallet" && /* @__PURE__ */ jsxs31(Fragment2, { children: [
|
|
2131
2133
|
/* @__PURE__ */ jsx46("div", { className: "matchid-login-recommend-wallet-divider" }),
|
|
2132
|
-
/* @__PURE__ */ jsx46("div", { className: "matchid-login-recommend-wallet-list", children: walletMethods.map((
|
|
2134
|
+
/* @__PURE__ */ jsx46("div", { className: "matchid-login-recommend-wallet-list", children: walletMethods.map((n) => {
|
|
2135
|
+
const m2 = walletMap[n];
|
|
2133
2136
|
return /* @__PURE__ */ jsxs31(
|
|
2134
2137
|
"div",
|
|
2135
2138
|
{
|
|
@@ -2347,6 +2350,7 @@ function LoginButton({
|
|
|
2347
2350
|
popoverPosition = "right",
|
|
2348
2351
|
popoverType = "hover",
|
|
2349
2352
|
popoverGap = 20,
|
|
2353
|
+
walletMethods,
|
|
2350
2354
|
...props
|
|
2351
2355
|
}) {
|
|
2352
2356
|
const intl = useIntl8();
|
|
@@ -2354,7 +2358,16 @@ function LoginButton({
|
|
|
2354
2358
|
const [loginOpen, setLoginOpen] = useState11(false);
|
|
2355
2359
|
if (!isLogin) {
|
|
2356
2360
|
return /* @__PURE__ */ jsxs35(Fragment3, { children: [
|
|
2357
|
-
/* @__PURE__ */ jsx51(
|
|
2361
|
+
/* @__PURE__ */ jsx51(
|
|
2362
|
+
LoginModal,
|
|
2363
|
+
{
|
|
2364
|
+
methods,
|
|
2365
|
+
walletMethods,
|
|
2366
|
+
recommendMethods,
|
|
2367
|
+
isOpen: loginOpen,
|
|
2368
|
+
onClose: () => setLoginOpen(false)
|
|
2369
|
+
}
|
|
2370
|
+
),
|
|
2358
2371
|
/* @__PURE__ */ jsxs35(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
|
|
2359
2372
|
/* @__PURE__ */ jsx51(UnLoginIcon_default, {}),
|
|
2360
2373
|
/* @__PURE__ */ jsx51("span", { children: /* @__PURE__ */ jsx51(FormattedMessage8, { id: "login" }) })
|