@ape.swap/bonds-sdk 1.0.211 → 1.0.212
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.
|
@@ -11,16 +11,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
13
13
|
import { styles } from './styles';
|
|
14
|
-
import { useTranslation } from '../../contexts/Localization';
|
|
15
14
|
import { useWeb3React } from '@web3-react/core';
|
|
16
15
|
import { Flex, Svg, Text } from '../uikit-sdk';
|
|
17
16
|
import { ChainId } from '../../enum/chains';
|
|
18
17
|
import { Link } from 'theme-ui';
|
|
19
18
|
var ButtonsRow = function (_a) {
|
|
20
19
|
var projectLink = _a.projectLink, twitter = _a.twitter, bubble = _a.bubble, audit = _a.audit;
|
|
21
|
-
var t = useTranslation().t;
|
|
22
20
|
var chainId = useWeb3React().chainId;
|
|
23
21
|
var bubbleURL = "https://app.bubblemaps.io/bsc/token/".concat(bubble);
|
|
24
|
-
return (_jsxs(Flex, __assign({ sx: { justifyContent: 'center' } }, { children: [_jsx(Flex, __assign({ sx: styles.iconButton, as: Link, href: projectLink, target: "_blank" }, { children: _jsx(Svg, { icon: "URL", width: 18 }) })), _jsx(Flex, __assign({ sx: styles.iconButton, as: Link, href: twitter, target: "_blank" }, { children: _jsx(Svg, { icon: "twitter", width: 18, color: "text" }) })), chainId === ChainId.BSC && bubble && (_jsx(Flex, __assign({ sx: styles.iconButton, as: Link, href: bubbleURL, target: "_blank" }, { children: _jsx(Svg, { icon: "bubble", width: 18, color: "text" }) }))), audit && (_jsxs(Flex, __assign({ sx: __assign(__assign({}, styles.iconButton), { margin: '0 0 5px 0', '& svg': { marginRight: '5px' } }), as: Link, href: audit, target: "_blank" }, { children: [_jsx(Svg, { icon: "audit", width: 18, color: "text" }), _jsx(Text, __assign({ sx: { paddingRight: '5px' } }, { children:
|
|
22
|
+
return (_jsxs(Flex, __assign({ sx: { justifyContent: 'center' } }, { children: [_jsx(Flex, __assign({ sx: styles.iconButton, as: Link, href: projectLink, target: "_blank" }, { children: _jsx(Svg, { icon: "URL", width: 18 }) })), _jsx(Flex, __assign({ sx: styles.iconButton, as: Link, href: twitter, target: "_blank" }, { children: _jsx(Svg, { icon: "twitter", width: 18, color: "text" }) })), chainId === ChainId.BSC && bubble && (_jsx(Flex, __assign({ sx: styles.iconButton, as: Link, href: bubbleURL, target: "_blank" }, { children: _jsx(Svg, { icon: "bubble", width: 18, color: "text" }) }))), audit && (_jsxs(Flex, __assign({ sx: __assign(__assign({}, styles.iconButton), { margin: '0 0 5px 0', '& svg': { marginRight: '5px' } }), as: Link, href: audit, target: "_blank" }, { children: [_jsx(Svg, { icon: "audit", width: 18, color: "text" }), _jsx(Text, __assign({ sx: { paddingRight: '5px' } }, { children: 'Audit' }))] })))] })));
|
|
25
23
|
};
|
|
26
24
|
export default ButtonsRow;
|
|
@@ -10,7 +10,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
|
|
13
|
-
import { useTranslation } from '../../contexts/Localization';
|
|
14
13
|
import { styles } from './styles';
|
|
15
14
|
import { BLOCK_EXPLORER } from '../../config/constants/chains';
|
|
16
15
|
import ButtonsRow from './ButtonsRow';
|
|
@@ -18,9 +17,8 @@ import { Flex, Text, Svg } from '../uikit-sdk';
|
|
|
18
17
|
import { Link } from 'theme-ui';
|
|
19
18
|
var Tooltip = function (_a) {
|
|
20
19
|
var valueTitle = _a.valueTitle, valueContent = _a.valueContent, value2Title = _a.value2Title, value2Content = _a.value2Content, tokenContract = _a.tokenContract, secondURL = _a.secondURL, secondURLTitle = _a.secondURLTitle, projectLink = _a.projectLink, twitter = _a.twitter, audit = _a.audit, thirdURL = _a.thirdURL, thirdURLTitle = _a.thirdURLTitle, chain = _a.chain;
|
|
21
|
-
var t = useTranslation().t;
|
|
22
20
|
var explorerLink = BLOCK_EXPLORER[chain];
|
|
23
21
|
var tokenLink = "".concat(explorerLink, "/address/").concat(tokenContract);
|
|
24
|
-
return (_jsxs(Flex, __assign({ sx: { flexDirection: 'column', flexWrap: 'wrap' } }, { children: [projectLink && twitter && (_jsx(ButtonsRow, { twitter: twitter, projectLink: projectLink, bubble: tokenContract, audit: audit })), valueTitle && (_jsxs(Flex, __assign({ sx: styles.infoRow }, { children: [_jsxs(Text, __assign({ sx: styles.titleText }, { children: [valueTitle, ": "] })), _jsx(Text, __assign({ sx: styles.contentText }, { children: valueContent }))] }))), value2Title && (_jsxs(Flex, __assign({ sx: styles.infoRow }, { children: [_jsxs(Text, __assign({ sx: styles.titleText }, { children: [value2Title, ": "] })), _jsx(Text, __assign({ sx: styles.contentText }, { children: value2Content }))] }))), _jsx(Flex, __assign({ sx: { justifyContent: 'center' } }, { children: _jsxs(Flex, __assign({ sx: { width: '144px', flexDirection: 'column' } }, { children: [_jsx(Flex, __assign({ sx: styles.linkRow }, { children: _jsxs(Link, __assign({ href: tokenLink, sx: styles.link, target: "_blank" }, { children: [
|
|
22
|
+
return (_jsxs(Flex, __assign({ sx: { flexDirection: 'column', flexWrap: 'wrap' } }, { children: [projectLink && twitter && (_jsx(ButtonsRow, { twitter: twitter, projectLink: projectLink, bubble: tokenContract, audit: audit })), valueTitle && (_jsxs(Flex, __assign({ sx: styles.infoRow }, { children: [_jsxs(Text, __assign({ sx: styles.titleText }, { children: [valueTitle, ": "] })), _jsx(Text, __assign({ sx: styles.contentText }, { children: valueContent }))] }))), value2Title && (_jsxs(Flex, __assign({ sx: styles.infoRow }, { children: [_jsxs(Text, __assign({ sx: styles.titleText }, { children: [value2Title, ": "] })), _jsx(Text, __assign({ sx: styles.contentText }, { children: value2Content }))] }))), _jsx(Flex, __assign({ sx: { justifyContent: 'center' } }, { children: _jsxs(Flex, __assign({ sx: { width: '144px', flexDirection: 'column' } }, { children: [_jsx(Flex, __assign({ sx: styles.linkRow }, { children: _jsxs(Link, __assign({ href: tokenLink, sx: styles.link, target: "_blank" }, { children: ['View Token Contract', _jsx(Flex, __assign({ sx: { ml: '5px' } }, { children: _jsx(Svg, { icon: "external", color: "text", width: 10 }) }))] })) })), secondURL && (_jsx(Flex, __assign({ sx: styles.linkRow }, { children: _jsxs(Link, __assign({ href: secondURL, sx: styles.link, target: "_blank" }, { children: [secondURLTitle, _jsx(Flex, __assign({ sx: { ml: '5px' } }, { children: _jsx(Svg, { icon: "external", color: "text", width: 10 }) }))] })) }))), thirdURL && (_jsx(Flex, __assign({ sx: styles.linkRow }, { children: _jsx(Link, __assign({ href: thirdURL, sx: styles.link, target: "_blank" }, { children: thirdURLTitle })) })))] })) }))] })));
|
|
25
23
|
};
|
|
26
24
|
export default Tooltip;
|