thirdweb 5.58.0 → 5.58.2
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/cjs/react/core/hooks/others/useProfiles.js +4 -3
- package/dist/cjs/react/core/hooks/others/useProfiles.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/LinkProfileScreen.js +13 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/LinkProfileScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ManageWalletScreen.js +6 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ManageWalletScreen.js.map +1 -1
- package/dist/cjs/react/web/wallets/ecosystem/EcosystemWalletConnectUI.js +6 -5
- package/dist/cjs/react/web/wallets/ecosystem/EcosystemWalletConnectUI.js.map +1 -1
- package/dist/cjs/react/web/wallets/in-app/InAppWalletConnectUI.js +7 -3
- package/dist/cjs/react/web/wallets/in-app/InAppWalletConnectUI.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/ConnectWalletSocialOptions.js +1 -1
- package/dist/cjs/react/web/wallets/shared/ConnectWalletSocialOptions.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wallets/in-app/core/authentication/linkAccount.js +14 -13
- package/dist/cjs/wallets/in-app/core/authentication/linkAccount.js.map +1 -1
- package/dist/cjs/wallets/in-app/core/wallet/ecosystem-core.js +27 -12
- package/dist/cjs/wallets/in-app/core/wallet/ecosystem-core.js.map +1 -1
- package/dist/cjs/wallets/in-app/core/wallet/profiles.js +3 -2
- package/dist/cjs/wallets/in-app/core/wallet/profiles.js.map +1 -1
- package/dist/esm/react/core/hooks/others/useProfiles.js +4 -3
- package/dist/esm/react/core/hooks/others/useProfiles.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/LinkProfileScreen.js +13 -2
- package/dist/esm/react/web/ui/ConnectWallet/screens/LinkProfileScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ManageWalletScreen.js +6 -2
- package/dist/esm/react/web/ui/ConnectWallet/screens/ManageWalletScreen.js.map +1 -1
- package/dist/esm/react/web/wallets/ecosystem/EcosystemWalletConnectUI.js +6 -5
- package/dist/esm/react/web/wallets/ecosystem/EcosystemWalletConnectUI.js.map +1 -1
- package/dist/esm/react/web/wallets/in-app/InAppWalletConnectUI.js +7 -3
- package/dist/esm/react/web/wallets/in-app/InAppWalletConnectUI.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/ConnectWalletSocialOptions.js +1 -1
- package/dist/esm/react/web/wallets/shared/ConnectWalletSocialOptions.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/wallets/in-app/core/authentication/linkAccount.js +14 -13
- package/dist/esm/wallets/in-app/core/authentication/linkAccount.js.map +1 -1
- package/dist/esm/wallets/in-app/core/wallet/ecosystem-core.js +27 -12
- package/dist/esm/wallets/in-app/core/wallet/ecosystem-core.js.map +1 -1
- package/dist/esm/wallets/in-app/core/wallet/profiles.js +3 -2
- package/dist/esm/wallets/in-app/core/wallet/profiles.js.map +1 -1
- package/dist/types/react/core/hooks/others/useProfiles.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/LinkProfileScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/ManageWalletScreen.d.ts.map +1 -1
- package/dist/types/react/web/wallets/in-app/InAppWalletConnectUI.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/wallets/in-app/core/authentication/linkAccount.d.ts +5 -2
- package/dist/types/wallets/in-app/core/authentication/linkAccount.d.ts.map +1 -1
- package/dist/types/wallets/in-app/core/wallet/ecosystem-core.d.ts.map +1 -1
- package/dist/types/wallets/in-app/core/wallet/profiles.d.ts +3 -2
- package/dist/types/wallets/in-app/core/wallet/profiles.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/react/core/hooks/others/useProfiles.ts +4 -3
- package/src/react/web/ui/ConnectWallet/screens/LinkProfileScreen.tsx +29 -2
- package/src/react/web/ui/ConnectWallet/screens/ManageWalletScreen.tsx +20 -16
- package/src/react/web/wallets/ecosystem/EcosystemWalletConnectUI.tsx +6 -6
- package/src/react/web/wallets/in-app/InAppWalletConnectUI.tsx +8 -6
- package/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx +1 -1
- package/src/version.ts +1 -1
- package/src/wallets/in-app/core/authentication/linkAccount.ts +17 -14
- package/src/wallets/in-app/core/wallet/ecosystem-core.ts +47 -13
- package/src/wallets/in-app/core/wallet/profiles.ts +6 -4
- package/dist/cjs/react/web/wallets/in-app/LinkButton.js +0 -23
- package/dist/cjs/react/web/wallets/in-app/LinkButton.js.map +0 -1
- package/dist/esm/react/web/wallets/in-app/LinkButton.js +0 -20
- package/dist/esm/react/web/wallets/in-app/LinkButton.js.map +0 -1
- package/dist/types/react/web/wallets/in-app/LinkButton.d.ts +0 -5
- package/dist/types/react/web/wallets/in-app/LinkButton.d.ts.map +0 -1
- package/src/react/web/wallets/in-app/LinkButton.tsx +0 -20
@@ -1,10 +1,12 @@
|
|
1
1
|
"use client";
|
2
2
|
import { ShuffleIcon } from "@radix-ui/react-icons";
|
3
3
|
import type { ThirdwebClient } from "../../../../../client/client.js";
|
4
|
+
import { isEcosystemWallet } from "../../../../../wallets/ecosystem/is-ecosystem-wallet.js";
|
4
5
|
import { isInAppWallet } from "../../../../../wallets/in-app/core/wallet/index.js";
|
5
6
|
import { injectedProvider } from "../../../../../wallets/injected/mipdStore.js";
|
6
7
|
import { fontSize, iconSize } from "../../../../core/design-system/index.js";
|
7
8
|
import { useActiveWallet } from "../../../../core/hooks/wallets/useActiveWallet.js";
|
9
|
+
import { useAdminWallet } from "../../../../core/hooks/wallets/useAdminAccount.js";
|
8
10
|
import { Spacer } from "../../components/Spacer.js";
|
9
11
|
import { Container, Line, ModalHeader } from "../../components/basic.js";
|
10
12
|
import { Text } from "../../components/text.js";
|
@@ -25,7 +27,7 @@ export function ManageWalletScreen(props: {
|
|
25
27
|
locale: ConnectLocale;
|
26
28
|
client: ThirdwebClient;
|
27
29
|
}) {
|
28
|
-
const activeWallet =
|
30
|
+
const activeWallet = useAdminWallet();
|
29
31
|
|
30
32
|
return (
|
31
33
|
<Container
|
@@ -56,21 +58,23 @@ export function ManageWalletScreen(props: {
|
|
56
58
|
/>
|
57
59
|
|
58
60
|
{/* Multi-auth */}
|
59
|
-
{activeWallet
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
{
|
71
|
-
|
72
|
-
|
73
|
-
|
61
|
+
{activeWallet &&
|
62
|
+
(activeWallet?.id === "inApp" ||
|
63
|
+
isEcosystemWallet(activeWallet)) && (
|
64
|
+
<MenuButton
|
65
|
+
onClick={() => {
|
66
|
+
props.setScreen("linked-profiles");
|
67
|
+
}}
|
68
|
+
style={{
|
69
|
+
fontSize: fontSize.sm,
|
70
|
+
}}
|
71
|
+
>
|
72
|
+
<MultiUserIcon size={iconSize.md} />
|
73
|
+
<Text color="primaryText">
|
74
|
+
{props.locale.manageWallet.linkedProfiles}
|
75
|
+
</Text>
|
76
|
+
</MenuButton>
|
77
|
+
)}
|
74
78
|
|
75
79
|
{/* Wallet Connect Receiver */}
|
76
80
|
<MenuButton
|
@@ -47,12 +47,12 @@ function EcosystemWalletConnectUI(props: {
|
|
47
47
|
return <LoadingScreen />;
|
48
48
|
}
|
49
49
|
|
50
|
-
const goBackToMain =
|
51
|
-
props.size === "compact"
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
50
|
+
const goBackToMain = () => {
|
51
|
+
if (props.size === "compact") {
|
52
|
+
props.goBack?.();
|
53
|
+
}
|
54
|
+
setSelectionData({});
|
55
|
+
};
|
56
56
|
|
57
57
|
const done = () => {
|
58
58
|
props.done();
|
@@ -53,12 +53,14 @@ function InAppWalletConnectUI(props: {
|
|
53
53
|
|
54
54
|
// if the the modal starts out with the wallet's connect ui instead of wallet selector - going back to main screen requires staying on the same component and clearing the selection data
|
55
55
|
// otherwise, we go back to the wallet selector by calling props.goBack
|
56
|
-
const goBackToMain =
|
57
|
-
initialScreen === props.wallet
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
56
|
+
const goBackToMain = () => {
|
57
|
+
if (initialScreen === props.wallet) {
|
58
|
+
setSelectionData({});
|
59
|
+
} else {
|
60
|
+
props.goBack?.();
|
61
|
+
setSelectionData({});
|
62
|
+
}
|
63
|
+
};
|
62
64
|
|
63
65
|
const done = () => {
|
64
66
|
props.done();
|
@@ -266,7 +266,7 @@ export const ConnectWalletSocialOptions = (
|
|
266
266
|
|
267
267
|
const connectPromise = (() => {
|
268
268
|
if (props.isLinking) {
|
269
|
-
if (wallet.id !== "inApp") {
|
269
|
+
if (wallet.id !== "inApp" && !isEcosystemWallet(wallet)) {
|
270
270
|
throw new Error("Only in-app wallets support multi-auth");
|
271
271
|
}
|
272
272
|
return linkProfile(wallet, connectOptions);
|
package/src/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = "5.58.
|
1
|
+
export const version = "5.58.2";
|
@@ -1,5 +1,7 @@
|
|
1
1
|
import type { ThirdwebClient } from "../../../../client/client.js";
|
2
2
|
import { getThirdwebBaseUrl } from "../../../../utils/domains.js";
|
3
|
+
import { getClientFetch } from "../../../../utils/fetch.js";
|
4
|
+
import type { Ecosystem } from "../../web/types.js";
|
3
5
|
import type { Profile } from "./types.js";
|
4
6
|
|
5
7
|
/**
|
@@ -11,14 +13,17 @@ import type { Profile } from "./types.js";
|
|
11
13
|
*/
|
12
14
|
export async function linkAccount({
|
13
15
|
client,
|
16
|
+
ecosystem,
|
14
17
|
tokenToLink,
|
15
18
|
}: {
|
16
19
|
client: ThirdwebClient;
|
20
|
+
ecosystem?: Ecosystem;
|
17
21
|
tokenToLink: string;
|
18
22
|
}): Promise<Profile[]> {
|
23
|
+
const clientFetch = getClientFetch(client, ecosystem);
|
19
24
|
const IN_APP_URL = getThirdwebBaseUrl("inAppWallet");
|
20
25
|
const currentAccountToken = localStorage.getItem(
|
21
|
-
`walletToken-${client.clientId}`,
|
26
|
+
`walletToken-${client.clientId}${ecosystem?.id ? `-${ecosystem.id}` : ""}`,
|
22
27
|
);
|
23
28
|
|
24
29
|
if (!currentAccountToken) {
|
@@ -26,12 +31,10 @@ export async function linkAccount({
|
|
26
31
|
}
|
27
32
|
|
28
33
|
const headers: Record<string, string> = {
|
29
|
-
"Content-Type": "application/json",
|
30
34
|
Authorization: `Bearer iaw-auth-token:${currentAccountToken}`,
|
31
|
-
"
|
35
|
+
"Content-Type": "application/json",
|
32
36
|
};
|
33
|
-
|
34
|
-
const linkedDetailsResp = await fetch(
|
37
|
+
const linkedDetailsResp = await clientFetch(
|
35
38
|
`${IN_APP_URL}/api/2024-05-05/account/connect`,
|
36
39
|
{
|
37
40
|
method: "POST",
|
@@ -61,23 +64,23 @@ export async function linkAccount({
|
|
61
64
|
*/
|
62
65
|
export async function getLinkedProfilesInternal({
|
63
66
|
client,
|
64
|
-
|
67
|
+
ecosystem,
|
68
|
+
}: { client: ThirdwebClient; ecosystem?: Ecosystem }): Promise<Profile[]> {
|
69
|
+
const clientFetch = getClientFetch(client, ecosystem);
|
65
70
|
const IN_APP_URL = getThirdwebBaseUrl("inAppWallet");
|
66
71
|
const currentAccountToken = localStorage.getItem(
|
67
|
-
`walletToken-${client.clientId}`,
|
72
|
+
`walletToken-${client.clientId}${ecosystem?.id ? `-${ecosystem.id}` : ""}`,
|
68
73
|
);
|
69
74
|
|
70
|
-
if (!currentAccountToken) {
|
71
|
-
throw new Error("Failed to get linked accounts, no user logged in");
|
72
|
-
}
|
73
|
-
|
74
75
|
const headers: Record<string, string> = {
|
75
|
-
"Content-Type": "application/json",
|
76
76
|
Authorization: `Bearer iaw-auth-token:${currentAccountToken}`,
|
77
|
-
"
|
77
|
+
"Content-Type": "application/json",
|
78
78
|
};
|
79
|
+
if (!currentAccountToken) {
|
80
|
+
throw new Error("Failed to get linked accounts, no user logged in");
|
81
|
+
}
|
79
82
|
|
80
|
-
const linkedAccountsResp = await
|
83
|
+
const linkedAccountsResp = await clientFetch(
|
81
84
|
`${IN_APP_URL}/api/2024-05-05/accounts`,
|
82
85
|
{
|
83
86
|
method: "GET",
|
@@ -8,6 +8,16 @@ import type {
|
|
8
8
|
CreateWalletArgs,
|
9
9
|
EcosystemWalletId,
|
10
10
|
} from "../../../wallet-types.js";
|
11
|
+
import type { Ecosystem } from "../../web/types.js";
|
12
|
+
import {
|
13
|
+
getLinkedProfilesInternal,
|
14
|
+
linkAccount as linkProfileWithToken,
|
15
|
+
} from "../authentication/linkAccount.js";
|
16
|
+
import type {
|
17
|
+
MultiStepAuthArgsType,
|
18
|
+
Profile,
|
19
|
+
SingleStepAuthArgsType,
|
20
|
+
} from "../authentication/types.js";
|
11
21
|
import type { InAppConnector } from "../interfaces/connector.js";
|
12
22
|
import { getOrCreateInAppWalletConnector } from "./in-app-core.js";
|
13
23
|
|
@@ -25,6 +35,10 @@ export function createEcosystemWallet(args: {
|
|
25
35
|
let account: Account | undefined = undefined;
|
26
36
|
let chain: Chain | undefined = undefined;
|
27
37
|
let client: ThirdwebClient | undefined;
|
38
|
+
const ecosystem: Ecosystem = {
|
39
|
+
id,
|
40
|
+
partnerId: createOptions?.partnerId,
|
41
|
+
};
|
28
42
|
|
29
43
|
return {
|
30
44
|
id,
|
@@ -38,7 +52,13 @@ export function createEcosystemWallet(args: {
|
|
38
52
|
return chain;
|
39
53
|
},
|
40
54
|
getConfig: () => createOptions,
|
55
|
+
getProfiles: async () => {
|
56
|
+
if (!client) {
|
57
|
+
return [];
|
58
|
+
}
|
41
59
|
|
60
|
+
return getLinkedProfilesInternal({ client, ecosystem });
|
61
|
+
},
|
42
62
|
getAccount: () => account,
|
43
63
|
autoConnect: async (options) => {
|
44
64
|
const { autoConnectInAppWallet } = await import("./index.js");
|
@@ -46,10 +66,7 @@ export function createEcosystemWallet(args: {
|
|
46
66
|
const connector = await getOrCreateInAppWalletConnector(
|
47
67
|
options.client,
|
48
68
|
connectorFactory,
|
49
|
-
|
50
|
-
id,
|
51
|
-
partnerId: createOptions?.partnerId,
|
52
|
-
},
|
69
|
+
ecosystem,
|
53
70
|
);
|
54
71
|
|
55
72
|
const [connectedAccount, connectedChain] = await autoConnectInAppWallet(
|
@@ -75,10 +92,7 @@ export function createEcosystemWallet(args: {
|
|
75
92
|
const connector = await getOrCreateInAppWalletConnector(
|
76
93
|
options.client,
|
77
94
|
connectorFactory,
|
78
|
-
|
79
|
-
id,
|
80
|
-
partnerId: createOptions?.partnerId,
|
81
|
-
},
|
95
|
+
ecosystem,
|
82
96
|
);
|
83
97
|
|
84
98
|
const [connectedAccount, connectedChain] = await connectInAppWallet(
|
@@ -104,10 +118,7 @@ export function createEcosystemWallet(args: {
|
|
104
118
|
const connector = await getOrCreateInAppWalletConnector(
|
105
119
|
client,
|
106
120
|
connectorFactory,
|
107
|
-
|
108
|
-
id,
|
109
|
-
partnerId: createOptions?.partnerId,
|
110
|
-
},
|
121
|
+
ecosystem,
|
111
122
|
);
|
112
123
|
const result = await connector.logout();
|
113
124
|
if (!result.success) {
|
@@ -122,5 +133,28 @@ export function createEcosystemWallet(args: {
|
|
122
133
|
chain = newChain;
|
123
134
|
emitter.emit("chainChanged", newChain);
|
124
135
|
},
|
125
|
-
|
136
|
+
// This is not included on the global interface but is force-resolved in linkProfile
|
137
|
+
linkProfile: async (
|
138
|
+
options: SingleStepAuthArgsType | MultiStepAuthArgsType,
|
139
|
+
): Promise<Profile[]> => {
|
140
|
+
if (!client) {
|
141
|
+
throw new Error(
|
142
|
+
"No client found, please connect the wallet before linking a profile",
|
143
|
+
);
|
144
|
+
}
|
145
|
+
|
146
|
+
const connector = await getOrCreateInAppWalletConnector(
|
147
|
+
client,
|
148
|
+
connectorFactory,
|
149
|
+
ecosystem,
|
150
|
+
);
|
151
|
+
|
152
|
+
const { storedToken } = await connector.authenticate(options);
|
153
|
+
return await linkProfileWithToken({
|
154
|
+
client,
|
155
|
+
ecosystem,
|
156
|
+
tokenToLink: storedToken.cookieString,
|
157
|
+
});
|
158
|
+
},
|
159
|
+
} as Wallet<EcosystemWalletId>;
|
126
160
|
}
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import { isEcosystemWallet } from "../../../../wallets/ecosystem/is-ecosystem-wallet.js";
|
2
|
+
import type { EcosystemWalletId } from "../../../../wallets/wallet-types.js";
|
1
3
|
import type { Wallet } from "../../../interfaces/wallet.js";
|
2
4
|
import type {
|
3
5
|
MultiStepAuthArgsType,
|
@@ -25,8 +27,8 @@ import type {
|
|
25
27
|
* ```
|
26
28
|
* @wallet
|
27
29
|
*/
|
28
|
-
export async function getProfiles(wallet: Wallet<"inApp">) {
|
29
|
-
if (wallet.id !== "inApp") {
|
30
|
+
export async function getProfiles(wallet: Wallet<"inApp" | EcosystemWalletId>) {
|
31
|
+
if (wallet.id !== "inApp" && !isEcosystemWallet(wallet)) {
|
30
32
|
throw new Error("Multi-auth currently only supports in-app wallets");
|
31
33
|
}
|
32
34
|
|
@@ -59,10 +61,10 @@ export async function getProfiles(wallet: Wallet<"inApp">) {
|
|
59
61
|
* @wallet
|
60
62
|
*/
|
61
63
|
export async function linkProfile(
|
62
|
-
wallet: Wallet<"inApp">,
|
64
|
+
wallet: Wallet<"inApp" | EcosystemWalletId>,
|
63
65
|
auth: MultiStepAuthArgsType | SingleStepAuthArgsType,
|
64
66
|
): Promise<Profile[]> {
|
65
|
-
if (wallet.id !== "inApp") {
|
67
|
+
if (wallet.id !== "inApp" && !isEcosystemWallet(wallet)) {
|
66
68
|
throw new Error("Multi-auth currently only supports in-app wallets");
|
67
69
|
}
|
68
70
|
|
@@ -1,23 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
"use client";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.LinkButton = void 0;
|
5
|
-
const CustomThemeProvider_js_1 = require("../../../core/design-system/CustomThemeProvider.js");
|
6
|
-
const index_js_1 = require("../../../core/design-system/index.js");
|
7
|
-
const elements_js_1 = require("../../ui/design-system/elements.js");
|
8
|
-
exports.LinkButton = (0, elements_js_1.StyledButton)((_) => {
|
9
|
-
const theme = (0, CustomThemeProvider_js_1.useCustomTheme)();
|
10
|
-
return {
|
11
|
-
all: "unset",
|
12
|
-
color: theme.colors.accentText,
|
13
|
-
fontSize: index_js_1.fontSize.sm,
|
14
|
-
cursor: "pointer",
|
15
|
-
textAlign: "center",
|
16
|
-
fontWeight: 500,
|
17
|
-
width: "100%",
|
18
|
-
"&:hover": {
|
19
|
-
color: theme.colors.primaryText,
|
20
|
-
},
|
21
|
-
};
|
22
|
-
});
|
23
|
-
//# sourceMappingURL=LinkButton.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"LinkButton.js","sourceRoot":"","sources":["../../../../../../src/react/web/wallets/in-app/LinkButton.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;AACb,+FAAoF;AACpF,mEAAgE;AAChE,oEAAkE;AAErD,QAAA,UAAU,GAAmB,IAAA,0BAAY,EAAC,CAAC,CAAC,EAAE,EAAE;IAC3D,MAAM,KAAK,GAAG,IAAA,uCAAc,GAAE,CAAC;IAC/B,OAAO;QACL,GAAG,EAAE,OAAO;QACZ,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU;QAC9B,QAAQ,EAAE,mBAAQ,CAAC,EAAE;QACrB,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,GAAG;QACf,KAAK,EAAE,MAAM;QACb,SAAS,EAAE;YACT,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW;SAChC;KACF,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
"use client";
|
2
|
-
import { useCustomTheme } from "../../../core/design-system/CustomThemeProvider.js";
|
3
|
-
import { fontSize } from "../../../core/design-system/index.js";
|
4
|
-
import { StyledButton } from "../../ui/design-system/elements.js";
|
5
|
-
export const LinkButton = /* @__PURE__ */ StyledButton((_) => {
|
6
|
-
const theme = useCustomTheme();
|
7
|
-
return {
|
8
|
-
all: "unset",
|
9
|
-
color: theme.colors.accentText,
|
10
|
-
fontSize: fontSize.sm,
|
11
|
-
cursor: "pointer",
|
12
|
-
textAlign: "center",
|
13
|
-
fontWeight: 500,
|
14
|
-
width: "100%",
|
15
|
-
"&:hover": {
|
16
|
-
color: theme.colors.primaryText,
|
17
|
-
},
|
18
|
-
};
|
19
|
-
});
|
20
|
-
//# sourceMappingURL=LinkButton.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"LinkButton.js","sourceRoot":"","sources":["../../../../../../src/react/web/wallets/in-app/LinkButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAElE,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE;IAC3D,MAAM,KAAK,GAAG,cAAc,EAAE,CAAC;IAC/B,OAAO;QACL,GAAG,EAAE,OAAO;QACZ,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU;QAC9B,QAAQ,EAAE,QAAQ,CAAC,EAAE;QACrB,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,GAAG;QACf,KAAK,EAAE,MAAM;QACb,SAAS,EAAE;YACT,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW;SAChC;KACF,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
@@ -1,5 +0,0 @@
|
|
1
|
-
export declare const LinkButton: import("@emotion/styled").StyledComponent<{
|
2
|
-
theme?: import("@emotion/react").Theme;
|
3
|
-
as?: React.ElementType;
|
4
|
-
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
5
|
-
//# sourceMappingURL=LinkButton.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"LinkButton.d.ts","sourceRoot":"","sources":["../../../../../../src/react/web/wallets/in-app/LinkButton.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU;;SAeW,MAAO,WAAW;qHADlD,CAAC"}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
"use client";
|
2
|
-
import { useCustomTheme } from "../../../core/design-system/CustomThemeProvider.js";
|
3
|
-
import { fontSize } from "../../../core/design-system/index.js";
|
4
|
-
import { StyledButton } from "../../ui/design-system/elements.js";
|
5
|
-
|
6
|
-
export const LinkButton = /* @__PURE__ */ StyledButton((_) => {
|
7
|
-
const theme = useCustomTheme();
|
8
|
-
return {
|
9
|
-
all: "unset",
|
10
|
-
color: theme.colors.accentText,
|
11
|
-
fontSize: fontSize.sm,
|
12
|
-
cursor: "pointer",
|
13
|
-
textAlign: "center",
|
14
|
-
fontWeight: 500,
|
15
|
-
width: "100%",
|
16
|
-
"&:hover": {
|
17
|
-
color: theme.colors.primaryText,
|
18
|
-
},
|
19
|
-
};
|
20
|
-
});
|