@rango-dev/ui 0.26.1-next.8 → 0.27.0
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.js +6 -6
- package/dist/index.js.map +4 -4
- package/dist/translations/en.d.ts.map +1 -1
- package/dist/translations/es.d.ts.map +1 -1
- package/dist/translations/fr.d.ts.map +1 -1
- package/dist/translations/ja.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Alert/Alert.styles.d.ts +8 -0
- package/dist/widget/ui/src/components/Alert/Alert.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/BlockchainsChip/BlockchainsChip.styles.d.ts +2 -0
- package/dist/widget/ui/src/components/BlockchainsChip/BlockchainsChip.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/BottomLogo/BottomLogo.styles.d.ts +4 -0
- package/dist/widget/ui/src/components/BottomLogo/BottomLogo.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Button/Button.styles.d.ts +6 -0
- package/dist/widget/ui/src/components/Button/Button.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/ChainToken/ChainToken.styles.d.ts +4 -0
- package/dist/widget/ui/src/components/ChainToken/ChainToken.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Checkbox/Checkbox.styles.d.ts +8 -0
- package/dist/widget/ui/src/components/Checkbox/Checkbox.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Chip/Chip.styles.d.ts +2 -0
- package/dist/widget/ui/src/components/Chip/Chip.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Collapsible/Collapsible.styles.d.ts +2 -0
- package/dist/widget/ui/src/components/Collapsible/Collapsible.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Divider/Divider.styles.d.ts +3 -1
- package/dist/widget/ui/src/components/Divider/Divider.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Drawer/Drawer.styles.d.ts +10 -0
- package/dist/widget/ui/src/components/Drawer/Drawer.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Header/Header.constants.d.ts +2 -0
- package/dist/widget/ui/src/components/Header/Header.constants.d.ts.map +1 -0
- package/dist/widget/ui/src/components/Header/Header.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Header/Header.styles.d.ts +5 -0
- package/dist/widget/ui/src/components/Header/Header.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Header/index.d.ts +1 -0
- package/dist/widget/ui/src/components/Header/index.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Icon/CloseIcon.d.ts +2 -0
- package/dist/widget/ui/src/components/Icon/CloseIcon.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Icon/common.d.ts +4 -0
- package/dist/widget/ui/src/components/Icon/common.d.ts.map +1 -1
- package/dist/widget/ui/src/components/List/List.styles.d.ts +2 -0
- package/dist/widget/ui/src/components/List/List.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/ListItem/ListItem.styles.d.ts +2 -0
- package/dist/widget/ui/src/components/ListItem/ListItem.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/ListItemButton/ListItemButton.styles.d.ts +2 -0
- package/dist/widget/ui/src/components/ListItemButton/ListItemButton.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/MessageBox/CollapsibleMessageBox.styles.d.ts +2 -0
- package/dist/widget/ui/src/components/MessageBox/CollapsibleMessageBox.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/MessageBox/MessageBox.styles.d.ts +6 -0
- package/dist/widget/ui/src/components/MessageBox/MessageBox.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Modal/Modal.styles.d.ts +12 -0
- package/dist/widget/ui/src/components/Modal/Modal.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/NotFound/NotFound.styles.d.ts +2 -0
- package/dist/widget/ui/src/components/NotFound/NotFound.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Popover/Popover.styles.d.ts +4 -0
- package/dist/widget/ui/src/components/Popover/Popover.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/PriceImpact/PriceImpact.styles.d.ts +4 -0
- package/dist/widget/ui/src/components/PriceImpact/PriceImpact.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/QuoteCost/QuoteCost.d.ts.map +1 -1
- package/dist/widget/ui/src/components/QuoteCost/QuoteCost.styles.d.ts +8 -0
- package/dist/widget/ui/src/components/QuoteCost/QuoteCost.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/QuoteCost/QuoteCost.types.d.ts +4 -0
- package/dist/widget/ui/src/components/QuoteCost/QuoteCost.types.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Radio/Radio.styles.d.ts +4 -0
- package/dist/widget/ui/src/components/Radio/Radio.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/RadioGroup/RadioGroup.styles.d.ts +8 -0
- package/dist/widget/ui/src/components/RadioGroup/RadioGroup.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/RefreshProgressButton/RefreshProgressButton.styles.d.ts +4 -0
- package/dist/widget/ui/src/components/RefreshProgressButton/RefreshProgressButton.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/RoutesOverview/RoutesOverview.d.ts +2 -0
- package/dist/widget/ui/src/components/RoutesOverview/RoutesOverview.d.ts.map +1 -1
- package/dist/widget/ui/src/components/SelectableCategoryList/SelectableCategoryList.styles.d.ts +6 -0
- package/dist/widget/ui/src/components/SelectableCategoryList/SelectableCategoryList.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Skeleton/Skeleton.styles.d.ts +2 -0
- package/dist/widget/ui/src/components/Skeleton/Skeleton.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/StepDetails/StepDetails.styles.d.ts +12 -0
- package/dist/widget/ui/src/components/StepDetails/StepDetails.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/SvgIcon/SvgIcon.style.d.ts +2 -0
- package/dist/widget/ui/src/components/SvgIcon/SvgIcon.style.d.ts.map +1 -1
- package/dist/widget/ui/src/components/SwapContainer/SwapContainer.d.ts +0 -1
- package/dist/widget/ui/src/components/SwapContainer/SwapContainer.d.ts.map +1 -1
- package/dist/widget/ui/src/components/SwapDetailsPlaceholder/SwapDetailsPlaceholder.d.ts +2 -0
- package/dist/widget/ui/src/components/SwapDetailsPlaceholder/SwapDetailsPlaceholder.d.ts.map +1 -1
- package/dist/widget/ui/src/components/SwapListItem/SwapListItem.styles.d.ts +12 -0
- package/dist/widget/ui/src/components/SwapListItem/SwapListItem.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/SwapListItem/SwapToken.styles.d.ts +18 -0
- package/dist/widget/ui/src/components/SwapListItem/SwapToken.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Switch/Switch.styles.d.ts +4 -0
- package/dist/widget/ui/src/components/Switch/Switch.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/TextField/TextField.styles.d.ts +6 -0
- package/dist/widget/ui/src/components/TextField/TextField.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/TokenAmount/TokenAmount.styles.d.ts +6 -0
- package/dist/widget/ui/src/components/TokenAmount/TokenAmount.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Tooltip/Tooltip.styles.d.ts +9 -1
- package/dist/widget/ui/src/components/Tooltip/Tooltip.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Tooltip/Tooltip.types.d.ts +6 -2
- package/dist/widget/ui/src/components/Tooltip/Tooltip.types.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Typography/Typography.styles.d.ts +6 -4
- package/dist/widget/ui/src/components/Typography/Typography.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Wallet/ClickableWallet.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Wallet/SelectableWallet.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Wallet/Wallet.styles.d.ts +10 -0
- package/dist/widget/ui/src/components/Wallet/Wallet.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Wallet/Wallet.types.d.ts +2 -0
- package/dist/widget/ui/src/components/Wallet/Wallet.types.d.ts.map +1 -1
- package/dist/widget/ui/src/components/common/FilledCircle.d.ts +2 -0
- package/dist/widget/ui/src/components/common/FilledCircle.d.ts.map +1 -1
- package/dist/widget/ui/src/components/common/Image.d.ts +2 -0
- package/dist/widget/ui/src/components/common/Image.d.ts.map +1 -1
- package/dist/widget/ui/src/components/common/styles.d.ts +2 -0
- package/dist/widget/ui/src/components/common/styles.d.ts.map +1 -1
- package/dist/widget/ui/src/containers/SwapHistory/SwapHistory.d.ts +20 -0
- package/dist/widget/ui/src/containers/SwapHistory/SwapHistory.d.ts.map +1 -1
- package/dist/widget/ui/src/containers/SwapInput/SwapInput.styles.d.ts +22 -0
- package/dist/widget/ui/src/containers/SwapInput/SwapInput.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/containers/SwapInput/TokenSection.styles.d.ts +10 -0
- package/dist/widget/ui/src/containers/SwapInput/TokenSection.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/containers/TokenSelector/TokenSelector.d.ts +2 -0
- package/dist/widget/ui/src/containers/TokenSelector/TokenSelector.d.ts.map +1 -1
- package/dist/widget/ui/src/icons/Add.d.ts +5 -0
- package/dist/widget/ui/src/icons/Add.d.ts.map +1 -0
- package/dist/widget/ui/src/icons/index.d.ts +1 -0
- package/dist/widget/ui/src/icons/index.d.ts.map +1 -1
- package/dist/widget/ui/src/theme.d.ts +9 -0
- package/dist/widget/ui/src/theme.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/Divider/Divider.styles.ts +15 -0
- package/src/components/Divider/Divider.tsx +2 -2
- package/src/components/Header/Header.constants.ts +1 -0
- package/src/components/Header/Header.styles.ts +46 -2
- package/src/components/Header/Header.tsx +5 -1
- package/src/components/Header/index.ts +1 -0
- package/src/components/Modal/Modal.tsx +1 -1
- package/src/components/QuoteCost/QuoteCost.styles.ts +28 -1
- package/src/components/QuoteCost/QuoteCost.tsx +28 -8
- package/src/components/QuoteCost/QuoteCost.types.ts +4 -0
- package/src/components/SwapContainer/SwapContainer.tsx +2 -14
- package/src/components/Tooltip/Tooltip.styles.ts +7 -0
- package/src/components/Tooltip/Tooltip.tsx +2 -1
- package/src/components/Tooltip/Tooltip.types.ts +6 -2
- package/src/components/Wallet/ClickableWallet.tsx +10 -5
- package/src/components/Wallet/SelectableWallet.tsx +11 -2
- package/src/components/Wallet/Wallet.styles.ts +4 -0
- package/src/components/Wallet/Wallet.types.ts +2 -0
- package/src/icons/Add.tsx +25 -0
- package/src/icons/index.ts +1 -0
- package/src/theme.ts +1 -0
|
@@ -5,13 +5,15 @@ import React from 'react';
|
|
|
5
5
|
|
|
6
6
|
import { Typography } from '../Typography';
|
|
7
7
|
|
|
8
|
-
import { Container, Suffix } from './Header.styles';
|
|
8
|
+
import { Container, globalHeaderStyles, Suffix } from './Header.styles';
|
|
9
9
|
|
|
10
10
|
export function Header({
|
|
11
11
|
prefix,
|
|
12
12
|
suffix,
|
|
13
13
|
title,
|
|
14
14
|
}: PropsWithChildren<PropTypes>) {
|
|
15
|
+
globalHeaderStyles();
|
|
16
|
+
|
|
15
17
|
return (
|
|
16
18
|
<Container>
|
|
17
19
|
{prefix}
|
|
@@ -19,6 +21,8 @@ export function Header({
|
|
|
19
21
|
{title}
|
|
20
22
|
</Typography>
|
|
21
23
|
<Suffix>{suffix}</Suffix>
|
|
24
|
+
<div className="rng-curve-left"></div>
|
|
25
|
+
<div className="rng-curve-right"></div>
|
|
22
26
|
</Container>
|
|
23
27
|
);
|
|
24
28
|
}
|
|
@@ -62,7 +62,7 @@ export function Modal(props: PropsWithChildren<PropTypes>) {
|
|
|
62
62
|
setActive(false);
|
|
63
63
|
timeoutRef.current = setTimeout(() => {
|
|
64
64
|
setIsMount(false);
|
|
65
|
-
container.style.overflow
|
|
65
|
+
container.style.removeProperty('overflow');
|
|
66
66
|
}, CLOSED_DELAY);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css, styled } from '../../theme';
|
|
1
|
+
import { css, keyframes, styled } from '../../theme';
|
|
2
2
|
|
|
3
3
|
export const Container = styled('div', {
|
|
4
4
|
borderRadius: '$xs',
|
|
@@ -23,7 +23,34 @@ export const iconStyles = css({
|
|
|
23
23
|
alignItems: 'center',
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
+
const blinker = keyframes({
|
|
27
|
+
'50%': {
|
|
28
|
+
opacity: 0.2,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
|
|
26
32
|
export const itemStyles = css({
|
|
27
33
|
display: 'flex',
|
|
28
34
|
alignItems: 'center',
|
|
35
|
+
'&.feeSection': {
|
|
36
|
+
cursor: 'pointer',
|
|
37
|
+
'&:hover': {
|
|
38
|
+
svg: {
|
|
39
|
+
color: '$secondary',
|
|
40
|
+
},
|
|
41
|
+
'._typography': {
|
|
42
|
+
color: '$secondary',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
'&.warning': {
|
|
47
|
+
animation: `${blinker} 2s linear infinite`,
|
|
48
|
+
|
|
49
|
+
svg: {
|
|
50
|
+
color: '$warning500',
|
|
51
|
+
},
|
|
52
|
+
'._typography': {
|
|
53
|
+
color: '$warning500',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
29
56
|
});
|
|
@@ -3,6 +3,7 @@ import type { PropTypes } from './QuoteCost.types';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
5
|
import { GasIcon, NumberIcon, TimeIcon } from '../../icons';
|
|
6
|
+
import { Tooltip } from '../Tooltip';
|
|
6
7
|
import { Typography } from '../Typography';
|
|
7
8
|
|
|
8
9
|
import {
|
|
@@ -13,17 +14,36 @@ import {
|
|
|
13
14
|
} from './QuoteCost.styles';
|
|
14
15
|
|
|
15
16
|
export function QuoteCost(props: PropTypes) {
|
|
16
|
-
const {
|
|
17
|
+
const {
|
|
18
|
+
fee,
|
|
19
|
+
time,
|
|
20
|
+
steps,
|
|
21
|
+
onClickFee,
|
|
22
|
+
tooltipGas,
|
|
23
|
+
feeWarning,
|
|
24
|
+
tooltipContainer,
|
|
25
|
+
} = props;
|
|
17
26
|
return (
|
|
18
27
|
<Container>
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
<Tooltip
|
|
29
|
+
container={tooltipContainer}
|
|
30
|
+
content={tooltipGas}
|
|
31
|
+
open={!onClickFee && !tooltipGas ? false : undefined}
|
|
32
|
+
side="bottom">
|
|
33
|
+
<div
|
|
34
|
+
className={`${itemStyles()} ${onClickFee ? 'feeSection' : ''} ${
|
|
35
|
+
feeWarning ? 'warning' : ''
|
|
36
|
+
}`}
|
|
37
|
+
onClick={onClickFee}>
|
|
38
|
+
<div className={iconStyles()}>
|
|
39
|
+
<GasIcon size={12} color={'gray'} />
|
|
40
|
+
</div>
|
|
41
|
+
<Typography ml={2} align="center" variant="body" size="small">
|
|
42
|
+
${fee}
|
|
43
|
+
</Typography>
|
|
22
44
|
</div>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</Typography>
|
|
26
|
-
</div>
|
|
45
|
+
</Tooltip>
|
|
46
|
+
|
|
27
47
|
<Separator />
|
|
28
48
|
<div className={itemStyles()}>
|
|
29
49
|
<div className={iconStyles()}>
|
|
@@ -22,28 +22,16 @@ const MainContainer = styled('div', {
|
|
|
22
22
|
boxSizing: 'border-box',
|
|
23
23
|
listStyleType: 'none',
|
|
24
24
|
},
|
|
25
|
-
variants: {
|
|
26
|
-
fixedHeight: {
|
|
27
|
-
true: {
|
|
28
|
-
height: '633px',
|
|
29
|
-
maxHeight: '633px',
|
|
30
|
-
},
|
|
31
|
-
false: {
|
|
32
|
-
height: 'auto',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
25
|
});
|
|
37
26
|
|
|
38
27
|
export interface PropTypes {
|
|
39
28
|
style?: CSSProperties;
|
|
40
|
-
fixedHeight?: boolean;
|
|
41
29
|
}
|
|
42
30
|
|
|
43
31
|
export function SwapContainer(props: PropsWithChildren<PropTypes>) {
|
|
44
|
-
const { children, style
|
|
32
|
+
const { children, style } = props;
|
|
45
33
|
return (
|
|
46
|
-
<MainContainer style={style} id="swap-box"
|
|
34
|
+
<MainContainer style={style} id="swap-box">
|
|
47
35
|
{children}
|
|
48
36
|
</MainContainer>
|
|
49
37
|
);
|
|
@@ -5,6 +5,13 @@ import { Typography } from '../Typography';
|
|
|
5
5
|
|
|
6
6
|
export const TooltipContent = styled(RadixTooltip.Content, {
|
|
7
7
|
zIndex: '999999',
|
|
8
|
+
variants: {
|
|
9
|
+
align: {
|
|
10
|
+
right: {
|
|
11
|
+
position: 'absolute',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
},
|
|
8
15
|
});
|
|
9
16
|
|
|
10
17
|
export const TooltipTypography = styled(Typography, {
|
|
@@ -20,6 +20,7 @@ export function Tooltip(props: PropsWithChildren<PropTypes>) {
|
|
|
20
20
|
open,
|
|
21
21
|
side = 'top',
|
|
22
22
|
style,
|
|
23
|
+
align,
|
|
23
24
|
} = props;
|
|
24
25
|
return (
|
|
25
26
|
<RadixTooltip.Provider delayDuration={0}>
|
|
@@ -28,7 +29,7 @@ export function Tooltip(props: PropsWithChildren<PropTypes>) {
|
|
|
28
29
|
<TriggerContent>{children}</TriggerContent>
|
|
29
30
|
</RadixTooltip.Trigger>
|
|
30
31
|
<RadixTooltip.Portal container={container}>
|
|
31
|
-
<TooltipContent side={side} sideOffset={sideOffset}>
|
|
32
|
+
<TooltipContent align={align} side={side} sideOffset={sideOffset}>
|
|
32
33
|
<TooltipTypography variant="label" size="medium" color={color}>
|
|
33
34
|
{content}
|
|
34
35
|
</TooltipTypography>
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import type { TooltipContent } from './Tooltip.styles';
|
|
1
2
|
import type * as RadixTooltip from '@radix-ui/react-tooltip';
|
|
2
|
-
import type
|
|
3
|
+
import type * as Stitches from '@stitches/react';
|
|
3
4
|
import type { ComponentProps, ReactNode } from 'react';
|
|
4
5
|
|
|
5
6
|
type RadixTooltipContentProps = ComponentProps<typeof RadixTooltip.Content>;
|
|
7
|
+
type BaseProps = Stitches.VariantProps<typeof TooltipContent>;
|
|
8
|
+
type BaseAlign = Exclude<BaseProps['align'], object>;
|
|
6
9
|
|
|
7
10
|
export interface PropTypes {
|
|
8
11
|
content: ReactNode;
|
|
@@ -11,5 +14,6 @@ export interface PropTypes {
|
|
|
11
14
|
sideOffset?: RadixTooltipContentProps['sideOffset'];
|
|
12
15
|
container?: HTMLElement;
|
|
13
16
|
open?: boolean;
|
|
14
|
-
style?: CSSProperties;
|
|
17
|
+
style?: Stitches.CSSProperties;
|
|
18
|
+
align?: BaseAlign;
|
|
15
19
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { WalletPropTypes } from './Wallet.types';
|
|
2
2
|
|
|
3
3
|
import { detectInstallLink } from '@rango-dev/wallets-shared';
|
|
4
|
-
import React from 'react';
|
|
4
|
+
import React, { Fragment } from 'react';
|
|
5
5
|
|
|
6
6
|
import { Image } from '../common';
|
|
7
7
|
import { Divider } from '../Divider';
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import { WalletState } from './Wallet.types';
|
|
21
21
|
|
|
22
22
|
function Wallet(props: WalletPropTypes) {
|
|
23
|
-
const { title, type, image, onClick, isLoading } = props;
|
|
23
|
+
const { title, type, image, onClick, isLoading, disabled = false } = props;
|
|
24
24
|
const info = makeInfo(props.state);
|
|
25
25
|
|
|
26
26
|
if (isLoading) {
|
|
@@ -35,10 +35,15 @@ function Wallet(props: WalletPropTypes) {
|
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
const WrapperComponent = disabled ? Fragment : Tooltip;
|
|
39
|
+
|
|
38
40
|
return (
|
|
39
|
-
<
|
|
41
|
+
<WrapperComponent
|
|
42
|
+
container={props.container}
|
|
43
|
+
content={info.tooltipText}
|
|
44
|
+
side="top">
|
|
40
45
|
<WalletButton
|
|
41
|
-
disabled={props.state == WalletState.CONNECTING}
|
|
46
|
+
disabled={props.state == WalletState.CONNECTING || disabled}
|
|
42
47
|
onClick={() => {
|
|
43
48
|
if (props.state === WalletState.NOT_INSTALLED) {
|
|
44
49
|
window.open(detectInstallLink(props.link), '_blank');
|
|
@@ -64,7 +69,7 @@ function Wallet(props: WalletPropTypes) {
|
|
|
64
69
|
</Typography>
|
|
65
70
|
</Text>
|
|
66
71
|
</WalletButton>
|
|
67
|
-
</
|
|
72
|
+
</WrapperComponent>
|
|
68
73
|
);
|
|
69
74
|
}
|
|
70
75
|
|
|
@@ -14,12 +14,21 @@ import {
|
|
|
14
14
|
import { type SelectablePropTypes, WalletState } from './Wallet.types';
|
|
15
15
|
|
|
16
16
|
export function SelectableWallet(props: SelectablePropTypes) {
|
|
17
|
-
const {
|
|
17
|
+
const {
|
|
18
|
+
title,
|
|
19
|
+
type,
|
|
20
|
+
image,
|
|
21
|
+
onClick,
|
|
22
|
+
selected,
|
|
23
|
+
description,
|
|
24
|
+
state,
|
|
25
|
+
disabled = false,
|
|
26
|
+
} = props;
|
|
18
27
|
const info = makeInfo(props.state);
|
|
19
28
|
return (
|
|
20
29
|
<WalletButton
|
|
21
30
|
selected={selected}
|
|
22
|
-
disabled={props.state == WalletState.CONNECTING}
|
|
31
|
+
disabled={props.state == WalletState.CONNECTING || disabled}
|
|
23
32
|
onClick={() => {
|
|
24
33
|
if (props.state === WalletState.NOT_INSTALLED) {
|
|
25
34
|
window.open(detectInstallLink(props.link), '_blank');
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { SvgIconPropsWithChildren } from '../components/SvgIcon';
|
|
2
|
+
|
|
3
|
+
import React, { createElement } from 'react';
|
|
4
|
+
|
|
5
|
+
import { SvgIcon } from '../components/SvgIcon';
|
|
6
|
+
|
|
7
|
+
function SvgAdd(props: SvgIconPropsWithChildren) {
|
|
8
|
+
return createElement(
|
|
9
|
+
SvgIcon,
|
|
10
|
+
props,
|
|
11
|
+
<svg viewBox="0 0 24 25" xmlns="http://www.w3.org/2000/svg">
|
|
12
|
+
<path
|
|
13
|
+
fillRule="evenodd"
|
|
14
|
+
d="M18.8611 13.6389H4.63889C4.15296 13.6389 3.75 13.2359 3.75 12.75C3.75 12.2641 4.15296 11.8611 4.63889 11.8611H18.8611C19.347 11.8611 19.75 12.2641 19.75 12.75C19.75 13.2359 19.347 13.6389 18.8611 13.6389Z"
|
|
15
|
+
fill="currentColor"
|
|
16
|
+
/>
|
|
17
|
+
<path
|
|
18
|
+
fillRule="evenodd"
|
|
19
|
+
d="M11.75 20.75C11.2641 20.75 10.8611 20.347 10.8611 19.8611V5.63889C10.8611 5.15296 11.2641 4.75 11.75 4.75C12.2359 4.75 12.6389 5.15296 12.6389 5.63889V19.8611C12.6389 20.347 12.2359 20.75 11.75 20.75Z"
|
|
20
|
+
fill="currentColor"
|
|
21
|
+
/>
|
|
22
|
+
</svg>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
export default SvgAdd;
|
package/src/icons/index.ts
CHANGED