@web3jskit/walletkit 0.0.1
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/README.md +1 -0
- package/dist/package.json +42 -0
- package/dist/src/assets/svg/dataBase.d.ts +6 -0
- package/dist/src/assets/svg/dataBase.js +7 -0
- package/dist/src/assets/svg/dataBase.js.map +1 -0
- package/dist/src/assets/svg/metaMaskWallet.d.ts +1 -0
- package/dist/src/assets/svg/metaMaskWallet.js +35 -0
- package/dist/src/assets/svg/metaMaskWallet.js.map +1 -0
- package/dist/src/components/ConnectButton/ConnectedInfo.d.ts +1 -0
- package/dist/src/components/ConnectButton/ConnectedInfo.js +12 -0
- package/dist/src/components/ConnectButton/ConnectedInfo.js.map +1 -0
- package/dist/src/components/ConnectButton/index.d.ts +8 -0
- package/dist/src/components/ConnectButton/index.js +15 -0
- package/dist/src/components/ConnectButton/index.js.map +1 -0
- package/dist/src/components/Connecting/index.d.ts +5 -0
- package/dist/src/components/Connecting/index.js +10 -0
- package/dist/src/components/Connecting/index.js.map +1 -0
- package/dist/src/components/Connecting/style.d.ts +2 -0
- package/dist/src/components/Connecting/style.js +52 -0
- package/dist/src/components/Connecting/style.js.map +1 -0
- package/dist/src/components/GetWallet/index.d.ts +6 -0
- package/dist/src/components/GetWallet/index.js +38 -0
- package/dist/src/components/GetWallet/index.js.map +1 -0
- package/dist/src/components/GetWallet/style.d.ts +2 -0
- package/dist/src/components/GetWallet/style.js +115 -0
- package/dist/src/components/GetWallet/style.js.map +1 -0
- package/dist/src/components/Header/ModalHeader.d.ts +7 -0
- package/dist/src/components/Header/ModalHeader.js +10 -0
- package/dist/src/components/Header/ModalHeader.js.map +1 -0
- package/dist/src/components/Header/style.d.ts +2 -0
- package/dist/src/components/Header/style.js +73 -0
- package/dist/src/components/Header/style.js.map +1 -0
- package/dist/src/components/Icon/index.d.ts +23 -0
- package/dist/src/components/Icon/index.js +47 -0
- package/dist/src/components/Icon/index.js.map +1 -0
- package/dist/src/components/Introduce/index.d.ts +5 -0
- package/dist/src/components/Introduce/index.js +9 -0
- package/dist/src/components/Introduce/index.js.map +1 -0
- package/dist/src/components/Introduce/style.d.ts +2 -0
- package/dist/src/components/Introduce/style.js +72 -0
- package/dist/src/components/Introduce/style.js.map +1 -0
- package/dist/src/components/Modal/ConnectModal.d.ts +8 -0
- package/dist/src/components/Modal/ConnectModal.js +82 -0
- package/dist/src/components/Modal/ConnectModal.js.map +1 -0
- package/dist/src/components/Modal/WalletInfoModal.d.ts +5 -0
- package/dist/src/components/Modal/WalletInfoModal.js +40 -0
- package/dist/src/components/Modal/WalletInfoModal.js.map +1 -0
- package/dist/src/components/Modal/index.d.ts +12 -0
- package/dist/src/components/Modal/index.js +53 -0
- package/dist/src/components/Modal/index.js.map +1 -0
- package/dist/src/components/Modal/style.d.ts +5 -0
- package/dist/src/components/Modal/style.js +156 -0
- package/dist/src/components/Modal/style.js.map +1 -0
- package/dist/src/components/SVGs/backArrowSvg.d.ts +2 -0
- package/dist/src/components/SVGs/backArrowSvg.js +4 -0
- package/dist/src/components/SVGs/backArrowSvg.js.map +1 -0
- package/dist/src/components/SVGs/closeSvg.d.ts +2 -0
- package/dist/src/components/SVGs/closeSvg.js +4 -0
- package/dist/src/components/SVGs/closeSvg.js.map +1 -0
- package/dist/src/components/SVGs/copiedSvg.d.ts +2 -0
- package/dist/src/components/SVGs/copiedSvg.js +4 -0
- package/dist/src/components/SVGs/copiedSvg.js.map +1 -0
- package/dist/src/components/SVGs/copySvg.d.ts +2 -0
- package/dist/src/components/SVGs/copySvg.js +4 -0
- package/dist/src/components/SVGs/copySvg.js.map +1 -0
- package/dist/src/components/SVGs/exitSvg.d.ts +2 -0
- package/dist/src/components/SVGs/exitSvg.js +4 -0
- package/dist/src/components/SVGs/exitSvg.js.map +1 -0
- package/dist/src/components/SVGs/metamaskQrCode.d.ts +2 -0
- package/dist/src/components/SVGs/metamaskQrCode.js +4 -0
- package/dist/src/components/SVGs/metamaskQrCode.js.map +1 -0
- package/dist/src/components/SVGs/spinSvg.d.ts +4 -0
- package/dist/src/components/SVGs/spinSvg.js +4 -0
- package/dist/src/components/SVGs/spinSvg.js.map +1 -0
- package/dist/src/components/Text/index.d.ts +18 -0
- package/dist/src/components/Text/index.js +23 -0
- package/dist/src/components/Text/index.js.map +1 -0
- package/dist/src/components/WalletKitProvider/ChainProvider.d.ts +9 -0
- package/dist/src/components/WalletKitProvider/ChainProvider.js +21 -0
- package/dist/src/components/WalletKitProvider/ChainProvider.js.map +1 -0
- package/dist/src/components/WalletKitProvider/I18nProvider.d.ts +13 -0
- package/dist/src/components/WalletKitProvider/I18nProvider.js +41 -0
- package/dist/src/components/WalletKitProvider/I18nProvider.js.map +1 -0
- package/dist/src/components/WalletKitProvider/ThemeProvider.d.ts +8 -0
- package/dist/src/components/WalletKitProvider/ThemeProvider.js +12 -0
- package/dist/src/components/WalletKitProvider/ThemeProvider.js.map +1 -0
- package/dist/src/components/WalletKitProvider/index.d.ts +11 -0
- package/dist/src/components/WalletKitProvider/index.js +14 -0
- package/dist/src/components/WalletKitProvider/index.js.map +1 -0
- package/dist/src/components/WalletList/index.d.ts +7 -0
- package/dist/src/components/WalletList/index.js +9 -0
- package/dist/src/components/WalletList/index.js.map +1 -0
- package/dist/src/components/WalletList/style.d.ts +2 -0
- package/dist/src/components/WalletList/style.js +101 -0
- package/dist/src/components/WalletList/style.js.map +1 -0
- package/dist/src/components/WalletTriggerButton/index.d.ts +10 -0
- package/dist/src/components/WalletTriggerButton/index.js +27 -0
- package/dist/src/components/WalletTriggerButton/index.js.map +1 -0
- package/dist/src/components/WalletTriggerButton/style.d.ts +2 -0
- package/dist/src/components/WalletTriggerButton/style.js +50 -0
- package/dist/src/components/WalletTriggerButton/style.js.map +1 -0
- package/dist/src/hooks/useWalletKit.d.ts +6 -0
- package/dist/src/hooks/useWalletKit.js +20 -0
- package/dist/src/hooks/useWalletKit.js.map +1 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/src/index.js +9 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/locals/i18n.d.ts +2 -0
- package/dist/src/locals/i18n.js +17 -0
- package/dist/src/locals/i18n.js.map +1 -0
- package/dist/src/locals/languages/en.json +27 -0
- package/dist/src/locals/languages/zh.json +27 -0
- package/dist/src/locals/resources.d.ts +60 -0
- package/dist/src/locals/resources.js +11 -0
- package/dist/src/locals/resources.js.map +1 -0
- package/dist/src/stores/SlotsWalletStore.d.ts +18 -0
- package/dist/src/stores/SlotsWalletStore.js +33 -0
- package/dist/src/stores/SlotsWalletStore.js.map +1 -0
- package/dist/src/stores/index.d.ts +34 -0
- package/dist/src/stores/index.js +41 -0
- package/dist/src/stores/index.js.map +1 -0
- package/dist/src/styled/index.d.ts +17 -0
- package/dist/src/styled/index.js +76 -0
- package/dist/src/styled/index.js.map +1 -0
- package/dist/src/test/getwalletprovider.test.d.ts +1 -0
- package/dist/src/test/getwalletprovider.test.js +10 -0
- package/dist/src/test/getwalletprovider.test.js.map +1 -0
- package/dist/src/test/setup.d.ts +1 -0
- package/dist/src/test/setup.js +7 -0
- package/dist/src/test/setup.js.map +1 -0
- package/dist/src/theme/index.d.ts +53 -0
- package/dist/src/theme/index.js +92 -0
- package/dist/src/theme/index.js.map +1 -0
- package/dist/src/types/configType.d.ts +2 -0
- package/dist/src/types/configType.js +2 -0
- package/dist/src/types/configType.js.map +1 -0
- package/dist/src/types/slotsType.d.ts +23 -0
- package/dist/src/types/slotsType.js +2 -0
- package/dist/src/types/slotsType.js.map +1 -0
- package/dist/src/utils/formatter.d.ts +1 -0
- package/dist/src/utils/formatter.js +6 -0
- package/dist/src/utils/formatter.js.map +1 -0
- package/dist/src/utils/generateAvatar.d.ts +4 -0
- package/dist/src/utils/generateAvatar.js +32 -0
- package/dist/src/utils/generateAvatar.js.map +1 -0
- package/dist/src/wallets/GelWallet/index.d.ts +0 -0
- package/dist/src/wallets/GelWallet/index.js +2 -0
- package/dist/src/wallets/GelWallet/index.js.map +1 -0
- package/dist/src/wallets/SlotsWallets/index.d.ts +3 -0
- package/dist/src/wallets/SlotsWallets/index.js +26 -0
- package/dist/src/wallets/SlotsWallets/index.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +42 -0
- package/src/assets/svg/dataBase.ts +17 -0
- package/src/assets/svg/metaMaskWallet.ts +35 -0
- package/src/components/ConnectButton/ConnectedInfo.tsx +17 -0
- package/src/components/ConnectButton/index.tsx +41 -0
- package/src/components/Connecting/index.tsx +26 -0
- package/src/components/Connecting/style.ts +53 -0
- package/src/components/GetWallet/index.tsx +88 -0
- package/src/components/GetWallet/style.ts +116 -0
- package/src/components/Header/ModalHeader.tsx +24 -0
- package/src/components/Header/style.ts +74 -0
- package/src/components/Icon/index.tsx +120 -0
- package/src/components/Introduce/index.tsx +30 -0
- package/src/components/Introduce/style.ts +73 -0
- package/src/components/Modal/ConnectModal.tsx +131 -0
- package/src/components/Modal/WalletInfoModal.tsx +82 -0
- package/src/components/Modal/index.tsx +80 -0
- package/src/components/Modal/style.ts +160 -0
- package/src/components/SVGs/backArrowSvg.tsx +10 -0
- package/src/components/SVGs/closeSvg.tsx +11 -0
- package/src/components/SVGs/copiedSvg.tsx +11 -0
- package/src/components/SVGs/copySvg.tsx +11 -0
- package/src/components/SVGs/exitSvg.tsx +11 -0
- package/src/components/SVGs/metamaskQrCode.tsx +393 -0
- package/src/components/SVGs/spinSvg.tsx +10 -0
- package/src/components/Text/index.tsx +59 -0
- package/src/components/WalletKitProvider/ChainProvider.tsx +34 -0
- package/src/components/WalletKitProvider/I18nProvider.tsx +52 -0
- package/src/components/WalletKitProvider/ThemeProvider.tsx +16 -0
- package/src/components/WalletKitProvider/index.tsx +40 -0
- package/src/components/WalletList/index.tsx +35 -0
- package/src/components/WalletList/style.ts +101 -0
- package/src/components/WalletTriggerButton/index.tsx +50 -0
- package/src/components/WalletTriggerButton/style.ts +51 -0
- package/src/default.d.ts +18 -0
- package/src/hooks/useWalletKit.ts +38 -0
- package/src/index.ts +8 -0
- package/src/locals/i18n.ts +19 -0
- package/src/locals/languages/en.json +27 -0
- package/src/locals/languages/zh.json +27 -0
- package/src/locals/resources.ts +11 -0
- package/src/stores/SlotsWalletStore.ts +48 -0
- package/src/stores/index.ts +74 -0
- package/src/styled/index.ts +79 -0
- package/src/test/getwalletprovider.test.ts +9 -0
- package/src/test/setup.ts +7 -0
- package/src/theme/index.ts +93 -0
- package/src/theme/styled.d.ts +30 -0
- package/src/types/configType.ts +2 -0
- package/src/types/slotsType.ts +23 -0
- package/src/utils/formatter.ts +4 -0
- package/src/utils/generateAvatar.ts +35 -0
- package/src/wallets/GelWallet/index.ts +0 -0
- package/src/wallets/SlotsWallets/index.ts +30 -0
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +55 -0
- package/vitest.config.ts +10 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import Modal from './index';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import ModalHeader from '../Header/ModalHeader';
|
|
4
|
+
import { useWalletKit } from '../../hooks/useWalletKit';
|
|
5
|
+
import { formatAddress } from '../../utils/formatter';
|
|
6
|
+
import { InfoModalContainer } from './style';
|
|
7
|
+
import CopySvg from '../SVGs/copySvg';
|
|
8
|
+
import CopiedSvg from '../SVGs/copiedSvg';
|
|
9
|
+
import ExitSvg from '../SVGs/exitSvg';
|
|
10
|
+
import copyToClipboard from 'copy-to-clipboard';
|
|
11
|
+
import { useEffect, useState } from 'react';
|
|
12
|
+
import { generateRandomAvatar } from '../../utils/generateAvatar';
|
|
13
|
+
|
|
14
|
+
interface ModalProps {
|
|
15
|
+
isOpen: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function WalletInfoModal({ isOpen }: ModalProps) {
|
|
19
|
+
const { t } = useTranslation();
|
|
20
|
+
const { walletAddress, closeModal, currentConnector, avatar, setAvatar } = useWalletKit();
|
|
21
|
+
|
|
22
|
+
const [copied, setCopied] = useState(false);
|
|
23
|
+
|
|
24
|
+
const generateAvatar = () => {
|
|
25
|
+
const newAvatar = generateRandomAvatar();
|
|
26
|
+
setAvatar(newAvatar);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
generateAvatar();
|
|
31
|
+
}, []);
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<Modal isOpen={isOpen}>
|
|
35
|
+
<InfoModalContainer>
|
|
36
|
+
<ModalHeader />
|
|
37
|
+
<div className="avatarBox" onClick={() => generateAvatar()}>
|
|
38
|
+
<div
|
|
39
|
+
className="avatar"
|
|
40
|
+
style={{
|
|
41
|
+
backgroundColor: avatar?.bg
|
|
42
|
+
}}
|
|
43
|
+
>
|
|
44
|
+
{avatar?.text}
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
<div className="accountInfo">
|
|
48
|
+
<div className="address">{formatAddress(walletAddress)}</div>
|
|
49
|
+
{/* <div className="tokenAmount">{'0 ETH'}</div> */}
|
|
50
|
+
</div>
|
|
51
|
+
<div className="btnGroup">
|
|
52
|
+
<div
|
|
53
|
+
className="button"
|
|
54
|
+
onClick={() => {
|
|
55
|
+
copyToClipboard(walletAddress);
|
|
56
|
+
if (copied) return;
|
|
57
|
+
setCopied(true);
|
|
58
|
+
setTimeout(() => {
|
|
59
|
+
setCopied(false);
|
|
60
|
+
}, 1000);
|
|
61
|
+
}}
|
|
62
|
+
>
|
|
63
|
+
<div className="btnIcon">{copied ? <CopiedSvg /> : <CopySvg />}</div>
|
|
64
|
+
<div className="btnText">{t(copied ? 'copied' : 'copyAddress')}</div>
|
|
65
|
+
</div>
|
|
66
|
+
<div
|
|
67
|
+
className="button"
|
|
68
|
+
onClick={() => {
|
|
69
|
+
currentConnector?.disconnect();
|
|
70
|
+
closeModal();
|
|
71
|
+
}}
|
|
72
|
+
>
|
|
73
|
+
<div className="btnIcon">
|
|
74
|
+
<ExitSvg />
|
|
75
|
+
</div>
|
|
76
|
+
<div className="btnText">{t('disConnect')}</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</InfoModalContainer>
|
|
80
|
+
</Modal>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type ReactNode, type RefObject } from 'react';
|
|
2
|
+
import { styled } from 'styled-components';
|
|
3
|
+
import { animated, useTransition } from '@react-spring/web';
|
|
4
|
+
import { DialogOverlay, DialogContent } from '@reach/dialog';
|
|
5
|
+
import '@reach/dialog/styles.css';
|
|
6
|
+
import { useWalletKit } from '../../hooks/useWalletKit';
|
|
7
|
+
|
|
8
|
+
const AnimatedDialogOverlay = animated(DialogOverlay);
|
|
9
|
+
|
|
10
|
+
const AnimatedDialogContent = animated(DialogContent);
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13
|
+
const StyledDialogOverlay = styled(AnimatedDialogOverlay)`
|
|
14
|
+
&[data-reach-dialog-overlay] {
|
|
15
|
+
width: 100vw;
|
|
16
|
+
z-index: 99;
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
const StyledDialogContent = styled(({ ...rest }) => <AnimatedDialogContent {...rest} />).attrs({
|
|
21
|
+
'aria-label': 'dialog'
|
|
22
|
+
})`
|
|
23
|
+
position: fixed;
|
|
24
|
+
left: 50%;
|
|
25
|
+
bottom: 50%;
|
|
26
|
+
transform: translate(-50%, 50%);
|
|
27
|
+
border-radius: 12px;
|
|
28
|
+
box-shadow: rgb(47 128 237 / 5%) 0 4px 8px 0;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
align-self: center;
|
|
31
|
+
padding: 0;
|
|
32
|
+
margin: 0;
|
|
33
|
+
outline: none;
|
|
34
|
+
width: auto;
|
|
35
|
+
background-color: ${({ theme }) => theme.modalBg};
|
|
36
|
+
|
|
37
|
+
@media (max-width: 768px) {
|
|
38
|
+
left: 0;
|
|
39
|
+
bottom: 0;
|
|
40
|
+
transform: none;
|
|
41
|
+
border-bottom-right-radius: 0;
|
|
42
|
+
border-bottom-left-radius: 0;
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
45
|
+
|
|
46
|
+
interface ModalProps {
|
|
47
|
+
isOpen: boolean;
|
|
48
|
+
minHeight?: number | false;
|
|
49
|
+
maxHeight?: number;
|
|
50
|
+
initialFocusRef?: RefObject<any>;
|
|
51
|
+
children?: ReactNode;
|
|
52
|
+
closeAble?: boolean;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export default function Modal({ isOpen, children, closeAble = true }: ModalProps) {
|
|
56
|
+
const transitions = useTransition(isOpen, {
|
|
57
|
+
from: { opacity: 0 },
|
|
58
|
+
enter: { opacity: 1 },
|
|
59
|
+
leave: { opacity: 0 },
|
|
60
|
+
config: { duration: 150 }
|
|
61
|
+
});
|
|
62
|
+
const { closeModal } = useWalletKit();
|
|
63
|
+
return (
|
|
64
|
+
<>
|
|
65
|
+
{transitions((styles: any, item: any) => {
|
|
66
|
+
return (
|
|
67
|
+
item && (
|
|
68
|
+
<StyledDialogOverlay
|
|
69
|
+
style={{ opacity: styles.opacity }}
|
|
70
|
+
onDismiss={closeAble ? closeModal : () => {}}
|
|
71
|
+
isOpen={isOpen}
|
|
72
|
+
>
|
|
73
|
+
<StyledDialogContent className={'dialog-content-style'}>{children}</StyledDialogContent>
|
|
74
|
+
</StyledDialogOverlay>
|
|
75
|
+
)
|
|
76
|
+
);
|
|
77
|
+
})}
|
|
78
|
+
</>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { styled } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
export const ModalContainer = styled.div`
|
|
4
|
+
display: flex;
|
|
5
|
+
width: 720px;
|
|
6
|
+
height: 506px;
|
|
7
|
+
|
|
8
|
+
@media (max-width: 768px) {
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
width: 100vw;
|
|
11
|
+
height: 454px;
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
export const ModalAside = styled.div`
|
|
16
|
+
width: 200px;
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
border-right: 1px solid ${({ theme }) => theme.borderColor};
|
|
20
|
+
padding-top: 16px;
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
|
|
23
|
+
@media (max-width: 768px) {
|
|
24
|
+
width: 100%;
|
|
25
|
+
border-right: none;
|
|
26
|
+
padding-top: 0;
|
|
27
|
+
padding-bottom: 24px;
|
|
28
|
+
background-color: ${({ theme }) => theme.modalSideBg};
|
|
29
|
+
|
|
30
|
+
&.hidden {
|
|
31
|
+
display: none;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
export const AsideList = styled.div`
|
|
37
|
+
overflow: auto;
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
gap: 16px;
|
|
41
|
+
padding: 0 20px;
|
|
42
|
+
|
|
43
|
+
@media (max-width: 768px) {
|
|
44
|
+
flex-direction: row;
|
|
45
|
+
|
|
46
|
+
// &::-webkit-scrollbar {
|
|
47
|
+
// display: none;
|
|
48
|
+
// }
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
export const ModalMain = styled.div`
|
|
53
|
+
flex: 1;
|
|
54
|
+
height: 100%;
|
|
55
|
+
`;
|
|
56
|
+
|
|
57
|
+
export const InfoModalContainer = styled.div`
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
align-items: center;
|
|
61
|
+
width: 360px;
|
|
62
|
+
height: 240px;
|
|
63
|
+
text-align: center;
|
|
64
|
+
|
|
65
|
+
.avatarBox {
|
|
66
|
+
margin-top: -28px;
|
|
67
|
+
font-size: 41px;
|
|
68
|
+
|
|
69
|
+
.avatar {
|
|
70
|
+
width: 74px;
|
|
71
|
+
height: 74px;
|
|
72
|
+
line-height: 74px;
|
|
73
|
+
border-radius: 50%;
|
|
74
|
+
user-select: none;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.accountInfo {
|
|
80
|
+
margin-top: 12px;
|
|
81
|
+
color: ${({ theme }) => theme.textColor};
|
|
82
|
+
|
|
83
|
+
.address {
|
|
84
|
+
font-size: 18px;
|
|
85
|
+
font-weight: 800;
|
|
86
|
+
line-height: 24px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.tokenAmount {
|
|
90
|
+
font-size: 14px;
|
|
91
|
+
font-weight: 600;
|
|
92
|
+
line-height: 18px;
|
|
93
|
+
color: ${({ theme }) => theme.textColor3};
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.btnGroup {
|
|
98
|
+
display: flex;
|
|
99
|
+
gap: 8px;
|
|
100
|
+
margin-top: 16px;
|
|
101
|
+
width: 100%;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
padding: 0 16px 16px;
|
|
104
|
+
box-sizing: border-box;
|
|
105
|
+
|
|
106
|
+
.button {
|
|
107
|
+
padding: 8px;
|
|
108
|
+
color: ${({ theme }) => theme.textColor};
|
|
109
|
+
width: 100%;
|
|
110
|
+
display: flex;
|
|
111
|
+
flex-direction: column;
|
|
112
|
+
align-items: center;
|
|
113
|
+
cursor: pointer;
|
|
114
|
+
border-radius: 12px;
|
|
115
|
+
background-color: ${({ theme }) => theme.infoBtnBg};
|
|
116
|
+
|
|
117
|
+
&:hover {
|
|
118
|
+
background-color: ${({ theme }) => theme.infoBtnHoverBg};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.btnIcon {
|
|
123
|
+
height: 18px;
|
|
124
|
+
}
|
|
125
|
+
.btnText {
|
|
126
|
+
font-size: 13px;
|
|
127
|
+
font-weight: 600;
|
|
128
|
+
line-height: 18px;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@media (max-width: 768px) {
|
|
133
|
+
width: 100vw;
|
|
134
|
+
height: 280px;
|
|
135
|
+
|
|
136
|
+
.avatarBox {
|
|
137
|
+
margin-top: -4px;
|
|
138
|
+
font-size: 45px;
|
|
139
|
+
|
|
140
|
+
.avatar {
|
|
141
|
+
width: 82px;
|
|
142
|
+
height: 82px;
|
|
143
|
+
line-height: 82px;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.accountInfo {
|
|
148
|
+
margin-top: 16px;
|
|
149
|
+
|
|
150
|
+
.address {
|
|
151
|
+
font-size: 20px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.tokenAmount {
|
|
155
|
+
font-size: 16px;
|
|
156
|
+
line-height: 20px;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const BackArrowSvg = (props: any) => (
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" {...props}>
|
|
3
|
+
<path
|
|
4
|
+
d="M3.05505 12.2283C3.08043 12.2779 3.11445 12.3238 3.15686 12.3637C3.16913 12.3753 3.18186 12.3862 3.195 12.3963L9.18767 17.3904C9.4033 17.5629 9.71795 17.528 9.89045 17.3124C10.063 17.0967 10.028 16.7821 9.81237 16.6096L4.92541 12.5H19.5C19.7762 12.5 20 12.2761 20 12C20 11.7239 19.7762 11.5 19.5 11.5H4.803L9.8345 6.87165C10.0398 6.68692 10.0564 6.37078 9.87167 6.16552C9.68694 5.96027 9.37079 5.94363 9.16554 6.12836L3.17252 11.6221C3.15999 11.633 3.14791 11.6445 3.13633 11.6568C3.09631 11.6992 3.06501 11.747 3.04255 11.7979C3.01196 11.867 2.99805 11.9411 3.00022 12.0145C3.00231 12.0879 3.02049 12.1611 3.05505 12.2283Z"
|
|
5
|
+
fill="#161617"
|
|
6
|
+
/>
|
|
7
|
+
</svg>
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
export default BackArrowSvg;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const CloseSvg = () => (
|
|
2
|
+
<svg aria-hidden="true" fill="none" height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<title>Close</title>
|
|
4
|
+
<path
|
|
5
|
+
d="M1.70711 0.292893C1.31658 -0.0976311 0.683417 -0.0976311 0.292893 0.292893C-0.0976311 0.683417 -0.0976311 1.31658 0.292893 1.70711L3.58579 5L0.292893 8.29289C-0.0976311 8.68342 -0.0976311 9.31658 0.292893 9.70711C0.683417 10.0976 1.31658 10.0976 1.70711 9.70711L5 6.41421L8.29289 9.70711C8.68342 10.0976 9.31658 10.0976 9.70711 9.70711C10.0976 9.31658 10.0976 8.68342 9.70711 8.29289L6.41421 5L9.70711 1.70711C10.0976 1.31658 10.0976 0.683417 9.70711 0.292893C9.31658 -0.0976311 8.68342 -0.0976311 8.29289 0.292893L5 3.58579L1.70711 0.292893Z"
|
|
6
|
+
fill="currentColor"
|
|
7
|
+
></path>
|
|
8
|
+
</svg>
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
export default CloseSvg;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const CopiedSvg = () => (
|
|
2
|
+
<svg fill="none" height="13" viewBox="0 0 13 13" width="13" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<title>Copied</title>
|
|
4
|
+
<path
|
|
5
|
+
d="M4.94568 12.2646C5.41052 12.2646 5.77283 12.0869 6.01892 11.7109L12.39 1.96973C12.5677 1.69629 12.6429 1.44336 12.6429 1.2041C12.6429 0.561523 12.1644 0.0966797 11.5082 0.0966797C11.057 0.0966797 10.7767 0.260742 10.5033 0.691406L4.9115 9.50977L2.07458 5.98926C1.82166 5.68848 1.54822 5.55176 1.16541 5.55176C0.502319 5.55176 0.0238037 6.02344 0.0238037 6.66602C0.0238037 6.95312 0.112671 7.20605 0.358765 7.48633L3.88611 11.7588C4.18005 12.1074 4.50818 12.2646 4.94568 12.2646Z"
|
|
6
|
+
fill="currentColor"
|
|
7
|
+
></path>
|
|
8
|
+
</svg>
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
export default CopiedSvg;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const CopySvg = () => (
|
|
2
|
+
<svg fill="none" height="16" viewBox="0 0 17 16" width="17" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<title>Copy</title>
|
|
4
|
+
<path
|
|
5
|
+
d="M3.04236 12.3027H4.18396V13.3008C4.18396 14.8525 5.03845 15.7002 6.59705 15.7002H13.6244C15.183 15.7002 16.0375 14.8525 16.0375 13.3008V6.24609C16.0375 4.69434 15.183 3.84668 13.6244 3.84668H12.4828V2.8418C12.4828 1.29688 11.6283 0.442383 10.0697 0.442383H3.04236C1.48376 0.442383 0.629272 1.29004 0.629272 2.8418V9.90332C0.629272 11.4551 1.48376 12.3027 3.04236 12.3027ZM3.23376 10.5391C2.68689 10.5391 2.39294 10.2656 2.39294 9.68457V3.06055C2.39294 2.47949 2.68689 2.21289 3.23376 2.21289H9.8783C10.4252 2.21289 10.7191 2.47949 10.7191 3.06055V3.84668H6.59705C5.03845 3.84668 4.18396 4.69434 4.18396 6.24609V10.5391H3.23376ZM6.78845 13.9365C6.24158 13.9365 5.94763 13.6699 5.94763 13.0889V6.45801C5.94763 5.87695 6.24158 5.61035 6.78845 5.61035H13.433C13.9799 5.61035 14.2738 5.87695 14.2738 6.45801V13.0889C14.2738 13.6699 13.9799 13.9365 13.433 13.9365H6.78845Z"
|
|
6
|
+
fill="currentColor"
|
|
7
|
+
></path>
|
|
8
|
+
</svg>
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
export default CopySvg;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const ExitSvg = () => (
|
|
2
|
+
<svg fill="none" height="16" viewBox="0 0 18 16" width="18" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<title>Disconnect</title>
|
|
4
|
+
<path
|
|
5
|
+
d="M2.67834 15.5908H9.99963C11.5514 15.5908 12.399 14.7432 12.399 13.1777V10.2656H10.6354V12.9863C10.6354 13.5332 10.3688 13.8271 9.78772 13.8271H2.89026C2.3092 13.8271 2.0426 13.5332 2.0426 12.9863V3.15625C2.0426 2.60254 2.3092 2.30859 2.89026 2.30859H9.78772C10.3688 2.30859 10.6354 2.60254 10.6354 3.15625V5.89746H12.399V2.95801C12.399 1.39941 11.5514 0.544922 9.99963 0.544922H2.67834C1.12659 0.544922 0.278931 1.39941 0.278931 2.95801V13.1777C0.278931 14.7432 1.12659 15.5908 2.67834 15.5908ZM7.43616 8.85059H14.0875L15.0924 8.78906L14.566 9.14453L13.6842 9.96484C13.5406 10.1016 13.4586 10.2861 13.4586 10.4844C13.4586 10.8398 13.7321 11.168 14.1217 11.168C14.3199 11.168 14.4635 11.0928 14.6002 10.9561L16.7809 8.68652C16.986 8.48145 17.0543 8.27637 17.0543 8.06445C17.0543 7.85254 16.986 7.64746 16.7809 7.43555L14.6002 5.17285C14.4635 5.03613 14.3199 4.9541 14.1217 4.9541C13.7321 4.9541 13.4586 5.27539 13.4586 5.6377C13.4586 5.83594 13.5406 6.02734 13.6842 6.15723L14.566 6.98438L15.0924 7.33984L14.0875 7.27148H7.43616C7.01917 7.27148 6.65686 7.62012 6.65686 8.06445C6.65686 8.50195 7.01917 8.85059 7.43616 8.85059Z"
|
|
6
|
+
fill="currentColor"
|
|
7
|
+
></path>
|
|
8
|
+
</svg>
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
export default ExitSvg;
|