@reown/appkit-ui-react-native 0.0.0-feat-coinbase-20250722184953 → 0.0.0-feat-onramp-20250722205908
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/lib/commonjs/assets/svg/ArrowBottom.js +1 -1
- package/lib/commonjs/assets/svg/ArrowBottomCircle.js +1 -1
- package/lib/commonjs/assets/svg/ArrowLeft.js +1 -1
- package/lib/commonjs/assets/svg/ArrowRight.js +1 -1
- package/lib/commonjs/assets/svg/ArrowTop.js +1 -1
- package/lib/commonjs/assets/svg/Browser.js +2 -2
- package/lib/commonjs/assets/svg/Card.js +1 -1
- package/lib/commonjs/assets/svg/Checkmark.js +1 -1
- package/lib/commonjs/assets/svg/ChevronBottom.js +1 -1
- package/lib/commonjs/assets/svg/ChevronLeft.js +1 -1
- package/lib/commonjs/assets/svg/ChevronRight.js +1 -1
- package/lib/commonjs/assets/svg/ChevronRightSmall.js +1 -1
- package/lib/commonjs/assets/svg/ChevronTop.js +1 -1
- package/lib/commonjs/assets/svg/Clock.js +1 -1
- package/lib/commonjs/assets/svg/Close.js +1 -1
- package/lib/commonjs/assets/svg/CoinPlaceholder.js +1 -1
- package/lib/commonjs/assets/svg/Compass.js +1 -1
- package/lib/commonjs/assets/svg/Copy.js +1 -1
- package/lib/commonjs/assets/svg/CopySmall.js +1 -1
- package/lib/commonjs/assets/svg/CurrencyDollar.js +1 -1
- package/lib/commonjs/assets/svg/Cursor.js +1 -1
- package/lib/commonjs/assets/svg/Desktop.js +2 -2
- package/lib/commonjs/assets/svg/Disconnect.js +1 -1
- package/lib/commonjs/assets/svg/Etherscan.js +1 -1
- package/lib/commonjs/assets/svg/Extension.js +1 -1
- package/lib/commonjs/assets/svg/ExternalLink.js +1 -1
- package/lib/commonjs/assets/svg/Filters.js +1 -1
- package/lib/commonjs/assets/svg/HelpCircle.js +2 -2
- package/lib/commonjs/assets/svg/InfoCircle.js +2 -2
- package/lib/commonjs/assets/svg/Mail.js +3 -5
- package/lib/commonjs/assets/svg/Mail.js.map +1 -1
- package/lib/commonjs/assets/svg/Mobile.js +2 -2
- package/lib/commonjs/assets/svg/More.js +1 -1
- package/lib/commonjs/assets/svg/NetworkPlaceholder.js +2 -2
- package/lib/commonjs/assets/svg/NftPlaceholder.js +1 -1
- package/lib/commonjs/assets/svg/Off.js +1 -1
- package/lib/commonjs/assets/svg/Paperplane.js +1 -1
- package/lib/commonjs/assets/svg/Plus.js +1 -1
- package/lib/commonjs/assets/svg/QrCode.js +1 -1
- package/lib/commonjs/assets/svg/RecycleHorizontal.js +1 -1
- package/lib/commonjs/assets/svg/Refresh.js +1 -1
- package/lib/commonjs/assets/svg/Search.js +1 -1
- package/lib/commonjs/assets/svg/Settings.js +1 -1
- package/lib/commonjs/assets/svg/SwapHorizontal.js +1 -1
- package/lib/commonjs/assets/svg/SwapVertical.js +1 -1
- package/lib/commonjs/assets/svg/Verify.js +1 -1
- package/lib/commonjs/assets/svg/Wallet.js +1 -1
- package/lib/commonjs/assets/svg/WalletConnect.js +1 -1
- package/lib/commonjs/assets/svg/WalletPlaceholder.js +1 -1
- package/lib/commonjs/assets/svg/WalletSmall.js +1 -1
- package/lib/commonjs/assets/svg/WarningCircle.js +2 -2
- package/lib/commonjs/components/wui-icon/index.js +1 -1
- package/lib/commonjs/components/wui-icon/index.js.map +1 -1
- package/lib/commonjs/composites/wui-double-image-loader/index.native.js +11 -11
- package/lib/commonjs/composites/wui-double-image-loader/index.native.js.map +1 -1
- package/lib/commonjs/composites/wui-email-input/index.js +1 -1
- package/lib/commonjs/composites/wui-email-input/index.js.map +1 -1
- package/lib/commonjs/composites/wui-list-item/index.js +5 -3
- package/lib/commonjs/composites/wui-list-item/index.js.map +1 -1
- package/lib/commonjs/composites/wui-list-social/index.js +4 -12
- package/lib/commonjs/composites/wui-list-social/index.js.map +1 -1
- package/lib/commonjs/composites/wui-list-social/styles.js +0 -3
- package/lib/commonjs/composites/wui-list-social/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-list-token/index.js +1 -3
- package/lib/commonjs/composites/wui-list-token/index.js.map +1 -1
- package/lib/commonjs/composites/wui-network-image/index.js +28 -31
- package/lib/commonjs/composites/wui-network-image/index.js.map +1 -1
- package/lib/commonjs/composites/wui-promo/index.js +48 -0
- package/lib/commonjs/composites/wui-promo/index.js.map +1 -0
- package/lib/commonjs/composites/wui-token-button/index.js +2 -2
- package/lib/commonjs/composites/wui-token-button/index.js.map +1 -1
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/UiUtil.js +10 -8
- package/lib/commonjs/utils/UiUtil.js.map +1 -1
- package/lib/module/assets/svg/ArrowBottom.js +1 -1
- package/lib/module/assets/svg/ArrowBottomCircle.js +1 -1
- package/lib/module/assets/svg/ArrowLeft.js +1 -1
- package/lib/module/assets/svg/ArrowRight.js +1 -1
- package/lib/module/assets/svg/ArrowTop.js +1 -1
- package/lib/module/assets/svg/Browser.js +2 -2
- package/lib/module/assets/svg/Card.js +1 -1
- package/lib/module/assets/svg/Checkmark.js +1 -1
- package/lib/module/assets/svg/ChevronBottom.js +1 -1
- package/lib/module/assets/svg/ChevronLeft.js +1 -1
- package/lib/module/assets/svg/ChevronRight.js +1 -1
- package/lib/module/assets/svg/ChevronRightSmall.js +1 -1
- package/lib/module/assets/svg/ChevronTop.js +1 -1
- package/lib/module/assets/svg/Clock.js +1 -1
- package/lib/module/assets/svg/Close.js +1 -1
- package/lib/module/assets/svg/CoinPlaceholder.js +1 -1
- package/lib/module/assets/svg/Compass.js +1 -1
- package/lib/module/assets/svg/Copy.js +1 -1
- package/lib/module/assets/svg/CopySmall.js +1 -1
- package/lib/module/assets/svg/CurrencyDollar.js +1 -1
- package/lib/module/assets/svg/Cursor.js +1 -1
- package/lib/module/assets/svg/Desktop.js +2 -2
- package/lib/module/assets/svg/Disconnect.js +1 -1
- package/lib/module/assets/svg/Etherscan.js +1 -1
- package/lib/module/assets/svg/Extension.js +1 -1
- package/lib/module/assets/svg/ExternalLink.js +1 -1
- package/lib/module/assets/svg/Filters.js +1 -1
- package/lib/module/assets/svg/HelpCircle.js +2 -2
- package/lib/module/assets/svg/InfoCircle.js +2 -2
- package/lib/module/assets/svg/Mail.js +4 -6
- package/lib/module/assets/svg/Mail.js.map +1 -1
- package/lib/module/assets/svg/Mobile.js +2 -2
- package/lib/module/assets/svg/More.js +1 -1
- package/lib/module/assets/svg/NetworkPlaceholder.js +2 -2
- package/lib/module/assets/svg/NftPlaceholder.js +1 -1
- package/lib/module/assets/svg/Off.js +1 -1
- package/lib/module/assets/svg/Paperplane.js +1 -1
- package/lib/module/assets/svg/Plus.js +1 -1
- package/lib/module/assets/svg/QrCode.js +1 -1
- package/lib/module/assets/svg/RecycleHorizontal.js +1 -1
- package/lib/module/assets/svg/Refresh.js +1 -1
- package/lib/module/assets/svg/Search.js +1 -1
- package/lib/module/assets/svg/Settings.js +1 -1
- package/lib/module/assets/svg/SwapHorizontal.js +1 -1
- package/lib/module/assets/svg/SwapVertical.js +1 -1
- package/lib/module/assets/svg/Verify.js +1 -1
- package/lib/module/assets/svg/Wallet.js +1 -1
- package/lib/module/assets/svg/WalletConnect.js +1 -1
- package/lib/module/assets/svg/WalletPlaceholder.js +1 -1
- package/lib/module/assets/svg/WalletSmall.js +1 -1
- package/lib/module/assets/svg/WarningCircle.js +2 -2
- package/lib/module/components/wui-icon/index.js +1 -1
- package/lib/module/components/wui-icon/index.js.map +1 -1
- package/lib/module/composites/wui-double-image-loader/index.native.js +11 -11
- package/lib/module/composites/wui-double-image-loader/index.native.js.map +1 -1
- package/lib/module/composites/wui-email-input/index.js +1 -1
- package/lib/module/composites/wui-email-input/index.js.map +1 -1
- package/lib/module/composites/wui-list-item/index.js +5 -3
- package/lib/module/composites/wui-list-item/index.js.map +1 -1
- package/lib/module/composites/wui-list-social/index.js +4 -12
- package/lib/module/composites/wui-list-social/index.js.map +1 -1
- package/lib/module/composites/wui-list-social/styles.js +0 -3
- package/lib/module/composites/wui-list-social/styles.js.map +1 -1
- package/lib/module/composites/wui-list-token/index.js +1 -3
- package/lib/module/composites/wui-list-token/index.js.map +1 -1
- package/lib/module/composites/wui-network-image/index.js +29 -31
- package/lib/module/composites/wui-network-image/index.js.map +1 -1
- package/lib/module/composites/wui-promo/index.js +42 -0
- package/lib/module/composites/wui-promo/index.js.map +1 -0
- package/lib/module/composites/wui-token-button/index.js +2 -2
- package/lib/module/composites/wui-token-button/index.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/TransactionUtil.js.map +1 -1
- package/lib/module/utils/UiUtil.js +10 -8
- package/lib/module/utils/UiUtil.js.map +1 -1
- package/lib/typescript/assets/svg/Mail.d.ts.map +1 -1
- package/lib/typescript/composites/wui-double-image-loader/index.native.d.ts.map +1 -1
- package/lib/typescript/composites/wui-list-item/index.d.ts +3 -2
- package/lib/typescript/composites/wui-list-item/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-list-social/index.d.ts +1 -3
- package/lib/typescript/composites/wui-list-social/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-list-social/styles.d.ts +0 -3
- package/lib/typescript/composites/wui-list-social/styles.d.ts.map +1 -1
- package/lib/typescript/composites/wui-list-token/index.d.ts +1 -1
- package/lib/typescript/composites/wui-list-token/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-network-image/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-promo/index.d.ts +8 -0
- package/lib/typescript/composites/wui-promo/index.d.ts.map +1 -0
- package/lib/typescript/composites/wui-token-button/index.d.ts +1 -1
- package/lib/typescript/composites/wui-token-button/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +2 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/utils/TransactionUtil.d.ts +1 -1
- package/lib/typescript/utils/TransactionUtil.d.ts.map +1 -1
- package/lib/typescript/utils/TypesUtil.d.ts +2 -2
- package/lib/typescript/utils/TypesUtil.d.ts.map +1 -1
- package/lib/typescript/utils/UiUtil.d.ts.map +1 -1
- package/package.json +2 -3
- package/src/assets/svg/ArrowBottom.tsx +1 -1
- package/src/assets/svg/ArrowBottomCircle.tsx +1 -1
- package/src/assets/svg/ArrowLeft.tsx +1 -1
- package/src/assets/svg/ArrowRight.tsx +1 -1
- package/src/assets/svg/ArrowTop.tsx +1 -1
- package/src/assets/svg/Browser.tsx +2 -2
- package/src/assets/svg/Card.tsx +1 -1
- package/src/assets/svg/Checkmark.tsx +1 -1
- package/src/assets/svg/ChevronBottom.tsx +1 -1
- package/src/assets/svg/ChevronLeft.tsx +1 -1
- package/src/assets/svg/ChevronRight.tsx +1 -1
- package/src/assets/svg/ChevronRightSmall.tsx +1 -1
- package/src/assets/svg/ChevronTop.tsx +1 -1
- package/src/assets/svg/Clock.tsx +1 -1
- package/src/assets/svg/Close.tsx +1 -1
- package/src/assets/svg/CoinPlaceholder.tsx +1 -1
- package/src/assets/svg/Compass.tsx +1 -1
- package/src/assets/svg/Copy.tsx +1 -1
- package/src/assets/svg/CopySmall.tsx +1 -1
- package/src/assets/svg/CurrencyDollar.tsx +1 -1
- package/src/assets/svg/Cursor.tsx +1 -1
- package/src/assets/svg/Desktop.tsx +2 -2
- package/src/assets/svg/Disconnect.tsx +1 -1
- package/src/assets/svg/Etherscan.tsx +1 -1
- package/src/assets/svg/Extension.tsx +1 -1
- package/src/assets/svg/ExternalLink.tsx +1 -1
- package/src/assets/svg/Filters.tsx +1 -1
- package/src/assets/svg/HelpCircle.tsx +2 -2
- package/src/assets/svg/InfoCircle.tsx +2 -2
- package/src/assets/svg/Mail.tsx +7 -9
- package/src/assets/svg/Mobile.tsx +2 -2
- package/src/assets/svg/More.tsx +1 -1
- package/src/assets/svg/NetworkPlaceholder.tsx +2 -2
- package/src/assets/svg/NftPlaceholder.tsx +1 -1
- package/src/assets/svg/Off.tsx +1 -1
- package/src/assets/svg/Paperplane.tsx +1 -1
- package/src/assets/svg/Plus.tsx +1 -1
- package/src/assets/svg/QrCode.tsx +1 -1
- package/src/assets/svg/RecycleHorizontal.tsx +1 -1
- package/src/assets/svg/Refresh.tsx +1 -1
- package/src/assets/svg/Search.tsx +1 -1
- package/src/assets/svg/Settings.tsx +1 -1
- package/src/assets/svg/SwapHorizontal.tsx +1 -1
- package/src/assets/svg/SwapVertical.tsx +1 -1
- package/src/assets/svg/Verify.tsx +1 -1
- package/src/assets/svg/Wallet.tsx +1 -1
- package/src/assets/svg/WalletConnect.tsx +1 -1
- package/src/assets/svg/WalletPlaceholder.tsx +1 -1
- package/src/assets/svg/WalletSmall.tsx +1 -1
- package/src/assets/svg/WarningCircle.tsx +2 -2
- package/src/components/wui-icon/index.tsx +1 -1
- package/src/composites/wui-double-image-loader/index.native.tsx +12 -11
- package/src/composites/wui-email-input/index.tsx +1 -1
- package/src/composites/wui-list-item/index.tsx +6 -2
- package/src/composites/wui-list-social/index.tsx +4 -14
- package/src/composites/wui-list-social/styles.ts +0 -3
- package/src/composites/wui-list-token/index.tsx +2 -5
- package/src/composites/wui-network-image/index.tsx +31 -47
- package/src/composites/wui-promo/index.tsx +42 -0
- package/src/composites/wui-token-button/index.tsx +3 -3
- package/src/index.ts +2 -2
- package/src/utils/TransactionUtil.ts +6 -6
- package/src/utils/TypesUtil.ts +1 -2
- package/src/utils/UiUtil.ts +11 -9
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Path, Svg, Image, Defs, Pattern
|
|
1
|
+
import { Path, Svg, Image, Defs, Pattern } from 'react-native-svg';
|
|
2
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import { useTheme } from '../../hooks/useTheme';
|
|
4
4
|
import type { SizeType } from '../../utils/TypesUtil';
|
|
5
|
-
import
|
|
5
|
+
import { Icon } from '../../components/wui-icon';
|
|
6
|
+
import { FlexView } from '../../layout/wui-flex';
|
|
6
7
|
import { PathLg, PathNormal, PathSmall, PathXS } from './styles';
|
|
7
8
|
|
|
8
9
|
export interface NetworkImageProps {
|
|
@@ -30,13 +31,6 @@ const sizeToHeight = {
|
|
|
30
31
|
xs: 20
|
|
31
32
|
};
|
|
32
33
|
|
|
33
|
-
const sizeToIconSize = {
|
|
34
|
-
lg: 24,
|
|
35
|
-
md: 16,
|
|
36
|
-
sm: 14,
|
|
37
|
-
xs: 12
|
|
38
|
-
};
|
|
39
|
-
|
|
40
34
|
export function NetworkImage({
|
|
41
35
|
imageSrc,
|
|
42
36
|
imageHeaders,
|
|
@@ -50,52 +44,42 @@ export function NetworkImage({
|
|
|
50
44
|
const Theme = useTheme();
|
|
51
45
|
const svgStroke = selected ? Theme['accent-100'] : Theme['gray-glass-010'];
|
|
52
46
|
const opacity = disabled ? 0.5 : 1;
|
|
53
|
-
const containerSize = sizeToHeight[size];
|
|
54
|
-
const iconSize = sizeToIconSize[size];
|
|
55
47
|
|
|
56
48
|
return (
|
|
57
49
|
<Svg
|
|
58
|
-
width={
|
|
59
|
-
height={
|
|
50
|
+
width={sizeToHeight[size]}
|
|
51
|
+
height={sizeToHeight[size]}
|
|
60
52
|
stroke={borderColor ?? svgStroke}
|
|
61
53
|
strokeWidth={borderWidth}
|
|
62
54
|
style={style}
|
|
63
55
|
>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
width={
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
>
|
|
73
|
-
<Image
|
|
74
|
-
height={containerSize}
|
|
75
|
-
width={containerSize}
|
|
76
|
-
opacity={opacity}
|
|
77
|
-
href={{ uri: imageSrc, headers: imageHeaders }}
|
|
78
|
-
/>
|
|
79
|
-
</Pattern>
|
|
80
|
-
</Defs>
|
|
81
|
-
<Path d={sizeToPath[size]} opacity={opacity} fill="url(#image-pattern)" />
|
|
82
|
-
</>
|
|
83
|
-
) : (
|
|
84
|
-
<>
|
|
85
|
-
<Path d={sizeToPath[size]} opacity={opacity} fill={Theme['gray-glass-005']} />
|
|
86
|
-
<G
|
|
87
|
-
transform={`translate(${(containerSize - iconSize) / 2}, ${
|
|
88
|
-
(containerSize - iconSize) / 2
|
|
89
|
-
})`}
|
|
90
|
-
>
|
|
91
|
-
<NetworkPlaceholderSvg
|
|
92
|
-
fill={selected ? Theme['accent-100'] : Theme['fg-200']}
|
|
93
|
-
width={iconSize}
|
|
94
|
-
height={iconSize}
|
|
56
|
+
<Defs>
|
|
57
|
+
<Pattern id="image-pattern">
|
|
58
|
+
{imageSrc ? (
|
|
59
|
+
<Image
|
|
60
|
+
height={sizeToHeight[size]}
|
|
61
|
+
width={sizeToHeight[size]}
|
|
62
|
+
opacity={opacity}
|
|
63
|
+
href={{ uri: imageSrc, headers: imageHeaders }}
|
|
95
64
|
/>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
65
|
+
) : (
|
|
66
|
+
<FlexView
|
|
67
|
+
alignItems="center"
|
|
68
|
+
justifyContent="center"
|
|
69
|
+
// eslint-disable-next-line react-native/no-inline-styles
|
|
70
|
+
style={{
|
|
71
|
+
height: sizeToHeight[size],
|
|
72
|
+
width: sizeToHeight[size],
|
|
73
|
+
backgroundColor: 'transparent'
|
|
74
|
+
}}
|
|
75
|
+
>
|
|
76
|
+
<Icon name="networkPlaceholder" size={size} color="fg-200" />
|
|
77
|
+
</FlexView>
|
|
78
|
+
)}
|
|
79
|
+
</Pattern>
|
|
80
|
+
</Defs>
|
|
81
|
+
{!imageSrc && <Path d={sizeToPath[size]} opacity={opacity} fill={Theme['gray-glass-005']} />}
|
|
82
|
+
<Path d={sizeToPath[size]} opacity={opacity} fill="url(#image-pattern)" />
|
|
99
83
|
</Svg>
|
|
100
84
|
);
|
|
101
85
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Pressable, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { Icon } from '../../components/wui-icon';
|
|
3
|
+
import { Text } from '../../components/wui-text';
|
|
4
|
+
import { useTheme } from '../../hooks/useTheme';
|
|
5
|
+
import { FlexView } from '../../layout/wui-flex';
|
|
6
|
+
import { BorderRadius, Spacing } from '../../utils/ThemeUtil';
|
|
7
|
+
|
|
8
|
+
export interface PromoProps {
|
|
9
|
+
text: string;
|
|
10
|
+
style?: StyleProp<ViewStyle>;
|
|
11
|
+
onPress?: () => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function Promo({ text, style, onPress }: PromoProps) {
|
|
15
|
+
const Theme = useTheme();
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<Pressable style={style} onPress={onPress}>
|
|
19
|
+
<FlexView
|
|
20
|
+
alignItems="center"
|
|
21
|
+
justifyContent="center"
|
|
22
|
+
flexDirection="row"
|
|
23
|
+
padding={['xs', 'xs', 'xs', 'm']}
|
|
24
|
+
style={[styles.container, { backgroundColor: Theme['gray-glass-090'] }]}
|
|
25
|
+
>
|
|
26
|
+
<Text variant="small-600" color="bg-100">
|
|
27
|
+
{text}
|
|
28
|
+
</Text>
|
|
29
|
+
<Icon style={styles.icon} name="arrowRight" color="bg-100" size="xs" />
|
|
30
|
+
</FlexView>
|
|
31
|
+
</Pressable>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const styles = StyleSheet.create({
|
|
36
|
+
container: {
|
|
37
|
+
borderRadius: BorderRadius.full
|
|
38
|
+
},
|
|
39
|
+
icon: {
|
|
40
|
+
marginLeft: Spacing['2xs']
|
|
41
|
+
}
|
|
42
|
+
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
|
|
2
4
|
import { Image } from '../../components/wui-image';
|
|
3
5
|
import { Text } from '../../components/wui-text';
|
|
4
6
|
import { Button } from '../wui-button';
|
|
5
7
|
import { Icon } from '../../components/wui-icon';
|
|
6
8
|
import styles from './styles';
|
|
7
9
|
import { useTheme } from '../../context/ThemeContext';
|
|
8
|
-
import { View } from 'react-native';
|
|
9
|
-
import React from 'react';
|
|
10
10
|
|
|
11
11
|
export interface TokenButtonProps {
|
|
12
12
|
onPress?: () => void;
|
package/src/index.ts
CHANGED
|
@@ -53,6 +53,7 @@ export { NetworkImage, type NetworkImageProps } from './composites/wui-network-i
|
|
|
53
53
|
export { NumericKeyboard, type NumericKeyboardProps } from './composites/wui-numeric-keyboard';
|
|
54
54
|
export { Otp, type OtpProps } from './composites/wui-otp';
|
|
55
55
|
export { Pressable, type PressableProps } from './components/wui-pressable';
|
|
56
|
+
export { Promo, type PromoProps } from './composites/wui-promo';
|
|
56
57
|
export { QrCode, type QrCodeProps } from './composites/wui-qr-code';
|
|
57
58
|
export { SearchBar, type SearchBarProps } from './composites/wui-search-bar';
|
|
58
59
|
export { Snackbar, type SnackbarProps } from './composites/wui-snackbar';
|
|
@@ -79,8 +80,7 @@ export type {
|
|
|
79
80
|
SizeType,
|
|
80
81
|
TagType,
|
|
81
82
|
TextType,
|
|
82
|
-
VisualType
|
|
83
|
-
TransactionType
|
|
83
|
+
VisualType
|
|
84
84
|
} from './utils/TypesUtil';
|
|
85
85
|
export { UiUtil } from './utils/UiUtil';
|
|
86
86
|
export { TransactionUtil } from './utils/TransactionUtil';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import {
|
|
2
|
+
type TransactionTransfer,
|
|
3
|
+
type Transaction,
|
|
4
|
+
type TransactionImage,
|
|
5
|
+
type TransactionMetadata,
|
|
6
|
+
DateUtil
|
|
7
7
|
} from '@reown/appkit-common-react-native';
|
|
8
8
|
import type { TransactionType } from './TypesUtil';
|
|
9
9
|
import { UiUtil } from './UiUtil';
|
package/src/utils/TypesUtil.ts
CHANGED
|
@@ -169,7 +169,7 @@ export type IconType =
|
|
|
169
169
|
| 'google'
|
|
170
170
|
| 'helpCircle'
|
|
171
171
|
| 'infoCircle'
|
|
172
|
-
| '
|
|
172
|
+
| 'mail'
|
|
173
173
|
| 'mobile'
|
|
174
174
|
| 'more'
|
|
175
175
|
| 'networkPlaceholder'
|
|
@@ -223,7 +223,6 @@ export type LogoType =
|
|
|
223
223
|
| 'more'
|
|
224
224
|
| 'telegram'
|
|
225
225
|
| 'twitch'
|
|
226
|
-
| 'email'
|
|
227
226
|
| 'x';
|
|
228
227
|
|
|
229
228
|
export type TagType = 'main' | 'shade' | 'error' | 'success';
|
package/src/utils/UiUtil.ts
CHANGED
|
@@ -71,18 +71,20 @@ export const UiUtil = {
|
|
|
71
71
|
},
|
|
72
72
|
|
|
73
73
|
formatNumberToLocalString(value: string | number | undefined, decimals = 2) {
|
|
74
|
-
let numericValue: number;
|
|
75
|
-
|
|
76
74
|
if (value === undefined) {
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
75
|
+
return '0.00';
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (typeof value === 'number') {
|
|
79
|
+
return value.toLocaleString('en-US', {
|
|
80
|
+
maximumFractionDigits: decimals,
|
|
81
|
+
minimumFractionDigits: decimals
|
|
82
|
+
});
|
|
82
83
|
}
|
|
83
84
|
|
|
84
|
-
return
|
|
85
|
-
maximumFractionDigits: decimals
|
|
85
|
+
return parseFloat(value).toLocaleString('en-US', {
|
|
86
|
+
maximumFractionDigits: decimals,
|
|
87
|
+
minimumFractionDigits: decimals
|
|
86
88
|
});
|
|
87
89
|
}
|
|
88
90
|
};
|