@reown/appkit-ui-react-native 0.0.0-develop-20241106142253 → 0.0.0-develop-20241112151556
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/components/wui-card/index.js +1 -1
- package/lib/commonjs/composites/wui-account-pill/index.js +4 -11
- package/lib/commonjs/composites/wui-account-pill/index.js.map +1 -1
- package/lib/commonjs/composites/wui-account-pill/styles.js +2 -1
- package/lib/commonjs/composites/wui-account-pill/styles.js.map +1 -1
- package/lib/module/components/wui-card/index.js +1 -1
- package/lib/module/composites/wui-account-pill/index.js +4 -11
- package/lib/module/composites/wui-account-pill/index.js.map +1 -1
- package/lib/module/composites/wui-account-pill/styles.js +2 -1
- package/lib/module/composites/wui-account-pill/styles.js.map +1 -1
- package/lib/typescript/composites/wui-account-pill/index.d.ts +1 -2
- package/lib/typescript/composites/wui-account-pill/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-account-pill/styles.d.ts +2 -1
- package/lib/typescript/composites/wui-account-pill/styles.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/wui-card/index.tsx +1 -1
- package/src/composites/wui-account-pill/index.tsx +2 -16
- package/src/composites/wui-account-pill/styles.ts +2 -1
|
@@ -7,16 +7,15 @@ exports.AccountPill = AccountPill;
|
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
8
|
var _wuiAvatar = require("../wui-avatar");
|
|
9
9
|
var _UiUtil = require("../../utils/UiUtil");
|
|
10
|
-
var _wuiIconLink = require("../wui-icon-link");
|
|
11
10
|
var _wuiText = require("../../components/wui-text");
|
|
12
11
|
var _useAnimatedValue = _interopRequireDefault(require("../../hooks/useAnimatedValue"));
|
|
13
12
|
var _useTheme = require("../../hooks/useTheme");
|
|
14
13
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
14
|
+
var _wuiIcon = require("../../components/wui-icon");
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
const AnimatedPressable = _reactNative.Animated.createAnimatedComponent(_reactNative.Pressable);
|
|
17
17
|
function AccountPill({
|
|
18
18
|
onPress,
|
|
19
|
-
onCopy,
|
|
20
19
|
address,
|
|
21
20
|
profileName,
|
|
22
21
|
profileImage,
|
|
@@ -30,11 +29,6 @@ function AccountPill({
|
|
|
30
29
|
} = (0, _useAnimatedValue.default)(Theme['gray-glass-005'], Theme['gray-glass-010']);
|
|
31
30
|
const backgroundColor = animatedValue;
|
|
32
31
|
const borderColor = Theme['gray-glass-005'];
|
|
33
|
-
const handleCopyAddress = () => {
|
|
34
|
-
if (address) {
|
|
35
|
-
onCopy(address);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
32
|
return /*#__PURE__*/React.createElement(AnimatedPressable, {
|
|
39
33
|
style: [_styles.default.container, {
|
|
40
34
|
backgroundColor,
|
|
@@ -63,11 +57,10 @@ function AccountPill({
|
|
|
63
57
|
charsStart: 4,
|
|
64
58
|
charsEnd: 4,
|
|
65
59
|
truncate: 'middle'
|
|
66
|
-
})), /*#__PURE__*/React.createElement(
|
|
67
|
-
|
|
60
|
+
})), /*#__PURE__*/React.createElement(_wuiIcon.Icon, {
|
|
61
|
+
name: "chevronBottom",
|
|
68
62
|
size: "sm",
|
|
69
|
-
|
|
70
|
-
onPress: handleCopyAddress,
|
|
63
|
+
color: "fg-200",
|
|
71
64
|
style: _styles.default.copyButton
|
|
72
65
|
}));
|
|
73
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_wuiAvatar","_UiUtil","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_wuiAvatar","_UiUtil","_wuiText","_useAnimatedValue","_interopRequireDefault","_useTheme","_styles","_wuiIcon","obj","__esModule","default","AnimatedPressable","Animated","createAnimatedComponent","Pressable","AccountPill","onPress","address","profileName","profileImage","style","Theme","useTheme","animatedValue","setStartValue","setEndValue","useAnimatedValue","backgroundColor","borderColor","React","createElement","styles","container","onPressIn","onPressOut","hitSlop","Avatar","imageSrc","size","borderWidth","Text","variant","color","text","UiUtil","getTruncateString","string","charsStart","charsEnd","truncate","Icon","name","copyButton"],"sourceRoot":"../../../../src","sources":["composites/wui-account-pill/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAAiD,SAAAK,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAUjD,MAAMG,iBAAiB,GAAGC,qBAAQ,CAACC,uBAAuB,CAACC,sBAAS,CAAC;AAE9D,SAASC,WAAWA,CAAC;EAC1BC,OAAO;EACPC,OAAO;EACPC,WAAW;EACXC,YAAY;EACZC;AACgB,CAAC,EAAE;EACnB,MAAMC,KAAK,GAAG,IAAAC,kBAAQ,EAAC,CAAC;EAExB,MAAM;IAAEC,aAAa;IAAEC,aAAa;IAAEC;EAAY,CAAC,GAAG,IAAAC,yBAAgB,EACpEL,KAAK,CAAC,gBAAgB,CAAC,EACvBA,KAAK,CAAC,gBAAgB,CACxB,CAAC;EAED,MAAMM,eAAe,GAAGJ,aAAa;EACrC,MAAMK,WAAW,GAAGP,KAAK,CAAC,gBAAgB,CAAC;EAE3C,oBACEQ,KAAA,CAAAC,aAAA,CAACnB,iBAAiB;IAChBS,KAAK,EAAE,CAACW,eAAM,CAACC,SAAS,EAAE;MAAEL,eAAe;MAAEC;IAAY,CAAC,EAAER,KAAK,CAAE;IACnEa,SAAS,EAAER,WAAY;IACvBS,UAAU,EAAEV,aAAc;IAC1BR,OAAO,EAAEA,OAAQ;IACjBmB,OAAO,EAAE;EAAG,gBAEZN,KAAA,CAAAC,aAAA,CAAC9B,UAAA,CAAAoC,MAAM;IAACC,QAAQ,EAAElB,YAAa;IAACF,OAAO,EAAEA,OAAQ;IAACqB,IAAI,EAAE,EAAG;IAACC,WAAW,EAAE;EAAE,CAAE,CAAC,eAC9EV,KAAA,CAAAC,aAAA,CAAC5B,QAAA,CAAAsC,IAAI;IAACC,OAAO,EAAC,WAAW;IAACC,KAAK,EAAC,QAAQ;IAACtB,KAAK,EAAEW,eAAM,CAACY;EAAK,GACzDzB,WAAW,GACR0B,cAAM,CAACC,iBAAiB,CAAC;IACvBC,MAAM,EAAE5B,WAAW;IACnB6B,UAAU,EAAE,EAAE;IACdC,QAAQ,EAAE,CAAC;IACXC,QAAQ,EAAE;EACZ,CAAC,CAAC,GACFL,cAAM,CAACC,iBAAiB,CAAC;IACvBC,MAAM,EAAE7B,OAAO,IAAI,EAAE;IACrB8B,UAAU,EAAE,CAAC;IACbC,QAAQ,EAAE,CAAC;IACXC,QAAQ,EAAE;EACZ,CAAC,CACD,CAAC,eACPpB,KAAA,CAAAC,aAAA,CAACvB,QAAA,CAAA2C,IAAI;IAACC,IAAI,EAAC,eAAe;IAACb,IAAI,EAAC,IAAI;IAACI,KAAK,EAAC,QAAQ;IAACtB,KAAK,EAAEW,eAAM,CAACqB;EAAW,CAAE,CAC9D,CAAC;AAExB"}
|
|
@@ -22,7 +22,8 @@ var _default = exports.default = _reactNative.StyleSheet.create({
|
|
|
22
22
|
marginLeft: _ThemeUtil.Spacing['2xs']
|
|
23
23
|
},
|
|
24
24
|
copyButton: {
|
|
25
|
-
|
|
25
|
+
marginLeft: _ThemeUtil.Spacing.xs,
|
|
26
|
+
marginRight: _ThemeUtil.Spacing.s
|
|
26
27
|
}
|
|
27
28
|
});
|
|
28
29
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_ThemeUtil","_default","exports","default","StyleSheet","create","container","height","minWidth","maxWidth","paddingLeft","Spacing","xs","flexDirection","alignItems","justifyContent","borderRadius","BorderRadius","full","borderWidth","hairlineWidth","text","marginLeft","copyButton","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_ThemeUtil","_default","exports","default","StyleSheet","create","container","height","minWidth","maxWidth","paddingLeft","Spacing","xs","flexDirection","alignItems","justifyContent","borderRadius","BorderRadius","full","borderWidth","hairlineWidth","text","marginLeft","copyButton","marginRight","s"],"sourceRoot":"../../../../src","sources":["composites/wui-account-pill/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAA8D,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAE/CC,uBAAU,CAACC,MAAM,CAAC;EAC/BC,SAAS,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,QAAQ,EAAE,GAAG;IACbC,QAAQ,EAAE,GAAG;IACbC,WAAW,EAAEC,kBAAO,CAACC,EAAE;IACvBC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,YAAY,EAAEC,uBAAY,CAACC,IAAI;IAC/BC,WAAW,EAAEf,uBAAU,CAACgB;EAC1B,CAAC;EACDC,IAAI,EAAE;IACJC,UAAU,EAAEX,kBAAO,CAAC,KAAK;EAC3B,CAAC;EACDY,UAAU,EAAE;IACVD,UAAU,EAAEX,kBAAO,CAACC,EAAE;IACtBY,WAAW,EAAEb,kBAAO,CAACc;EACvB;AACF,CAAC,CAAC"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { Animated, Pressable } from 'react-native';
|
|
2
2
|
import { Avatar } from '../wui-avatar';
|
|
3
3
|
import { UiUtil } from '../../utils/UiUtil';
|
|
4
|
-
import { IconLink } from '../wui-icon-link';
|
|
5
4
|
import { Text } from '../../components/wui-text';
|
|
6
5
|
import useAnimatedValue from '../../hooks/useAnimatedValue';
|
|
7
6
|
import { useTheme } from '../../hooks/useTheme';
|
|
8
7
|
import styles from './styles';
|
|
8
|
+
import { Icon } from '../../components/wui-icon';
|
|
9
9
|
const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
|
|
10
10
|
export function AccountPill({
|
|
11
11
|
onPress,
|
|
12
|
-
onCopy,
|
|
13
12
|
address,
|
|
14
13
|
profileName,
|
|
15
14
|
profileImage,
|
|
@@ -23,11 +22,6 @@ export function AccountPill({
|
|
|
23
22
|
} = useAnimatedValue(Theme['gray-glass-005'], Theme['gray-glass-010']);
|
|
24
23
|
const backgroundColor = animatedValue;
|
|
25
24
|
const borderColor = Theme['gray-glass-005'];
|
|
26
|
-
const handleCopyAddress = () => {
|
|
27
|
-
if (address) {
|
|
28
|
-
onCopy(address);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
25
|
return /*#__PURE__*/React.createElement(AnimatedPressable, {
|
|
32
26
|
style: [styles.container, {
|
|
33
27
|
backgroundColor,
|
|
@@ -56,11 +50,10 @@ export function AccountPill({
|
|
|
56
50
|
charsStart: 4,
|
|
57
51
|
charsEnd: 4,
|
|
58
52
|
truncate: 'middle'
|
|
59
|
-
})), /*#__PURE__*/React.createElement(
|
|
60
|
-
|
|
53
|
+
})), /*#__PURE__*/React.createElement(Icon, {
|
|
54
|
+
name: "chevronBottom",
|
|
61
55
|
size: "sm",
|
|
62
|
-
|
|
63
|
-
onPress: handleCopyAddress,
|
|
56
|
+
color: "fg-200",
|
|
64
57
|
style: styles.copyButton
|
|
65
58
|
}));
|
|
66
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Animated","Pressable","Avatar","UiUtil","
|
|
1
|
+
{"version":3,"names":["Animated","Pressable","Avatar","UiUtil","Text","useAnimatedValue","useTheme","styles","Icon","AnimatedPressable","createAnimatedComponent","AccountPill","onPress","address","profileName","profileImage","style","Theme","animatedValue","setStartValue","setEndValue","backgroundColor","borderColor","React","createElement","container","onPressIn","onPressOut","hitSlop","imageSrc","size","borderWidth","variant","color","text","getTruncateString","string","charsStart","charsEnd","truncate","name","copyButton"],"sourceRoot":"../../../../src","sources":["composites/wui-account-pill/index.tsx"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,SAAS,QAAwC,cAAc;AAClF,SAASC,MAAM,QAAQ,eAAe;AACtC,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,IAAI,QAAQ,2BAA2B;AAChD,OAAOC,gBAAgB,MAAM,8BAA8B;AAC3D,SAASC,QAAQ,QAAQ,sBAAsB;AAC/C,OAAOC,MAAM,MAAM,UAAU;AAC7B,SAASC,IAAI,QAAQ,2BAA2B;AAUhD,MAAMC,iBAAiB,GAAGT,QAAQ,CAACU,uBAAuB,CAACT,SAAS,CAAC;AAErE,OAAO,SAASU,WAAWA,CAAC;EAC1BC,OAAO;EACPC,OAAO;EACPC,WAAW;EACXC,YAAY;EACZC;AACgB,CAAC,EAAE;EACnB,MAAMC,KAAK,GAAGX,QAAQ,CAAC,CAAC;EAExB,MAAM;IAAEY,aAAa;IAAEC,aAAa;IAAEC;EAAY,CAAC,GAAGf,gBAAgB,CACpEY,KAAK,CAAC,gBAAgB,CAAC,EACvBA,KAAK,CAAC,gBAAgB,CACxB,CAAC;EAED,MAAMI,eAAe,GAAGH,aAAa;EACrC,MAAMI,WAAW,GAAGL,KAAK,CAAC,gBAAgB,CAAC;EAE3C,oBACEM,KAAA,CAAAC,aAAA,CAACf,iBAAiB;IAChBO,KAAK,EAAE,CAACT,MAAM,CAACkB,SAAS,EAAE;MAAEJ,eAAe;MAAEC;IAAY,CAAC,EAAEN,KAAK,CAAE;IACnEU,SAAS,EAAEN,WAAY;IACvBO,UAAU,EAAER,aAAc;IAC1BP,OAAO,EAAEA,OAAQ;IACjBgB,OAAO,EAAE;EAAG,gBAEZL,KAAA,CAAAC,aAAA,CAACtB,MAAM;IAAC2B,QAAQ,EAAEd,YAAa;IAACF,OAAO,EAAEA,OAAQ;IAACiB,IAAI,EAAE,EAAG;IAACC,WAAW,EAAE;EAAE,CAAE,CAAC,eAC9ER,KAAA,CAAAC,aAAA,CAACpB,IAAI;IAAC4B,OAAO,EAAC,WAAW;IAACC,KAAK,EAAC,QAAQ;IAACjB,KAAK,EAAET,MAAM,CAAC2B;EAAK,GACzDpB,WAAW,GACRX,MAAM,CAACgC,iBAAiB,CAAC;IACvBC,MAAM,EAAEtB,WAAW;IACnBuB,UAAU,EAAE,EAAE;IACdC,QAAQ,EAAE,CAAC;IACXC,QAAQ,EAAE;EACZ,CAAC,CAAC,GACFpC,MAAM,CAACgC,iBAAiB,CAAC;IACvBC,MAAM,EAAEvB,OAAO,IAAI,EAAE;IACrBwB,UAAU,EAAE,CAAC;IACbC,QAAQ,EAAE,CAAC;IACXC,QAAQ,EAAE;EACZ,CAAC,CACD,CAAC,eACPhB,KAAA,CAAAC,aAAA,CAAChB,IAAI;IAACgC,IAAI,EAAC,eAAe;IAACV,IAAI,EAAC,IAAI;IAACG,KAAK,EAAC,QAAQ;IAACjB,KAAK,EAAET,MAAM,CAACkC;EAAW,CAAE,CAC9D,CAAC;AAExB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","BorderRadius","Spacing","create","container","height","minWidth","maxWidth","paddingLeft","xs","flexDirection","alignItems","justifyContent","borderRadius","full","borderWidth","hairlineWidth","text","marginLeft","copyButton","
|
|
1
|
+
{"version":3,"names":["StyleSheet","BorderRadius","Spacing","create","container","height","minWidth","maxWidth","paddingLeft","xs","flexDirection","alignItems","justifyContent","borderRadius","full","borderWidth","hairlineWidth","text","marginLeft","copyButton","marginRight","s"],"sourceRoot":"../../../../src","sources":["composites/wui-account-pill/styles.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,YAAY,EAAEC,OAAO,QAAQ,uBAAuB;AAE7D,eAAeF,UAAU,CAACG,MAAM,CAAC;EAC/BC,SAAS,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,QAAQ,EAAE,GAAG;IACbC,QAAQ,EAAE,GAAG;IACbC,WAAW,EAAEN,OAAO,CAACO,EAAE;IACvBC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,YAAY,EAAEZ,YAAY,CAACa,IAAI;IAC/BC,WAAW,EAAEf,UAAU,CAACgB;EAC1B,CAAC;EACDC,IAAI,EAAE;IACJC,UAAU,EAAEhB,OAAO,CAAC,KAAK;EAC3B,CAAC;EACDiB,UAAU,EAAE;IACVD,UAAU,EAAEhB,OAAO,CAACO,EAAE;IACtBW,WAAW,EAAElB,OAAO,CAACmB;EACvB;AACF,CAAC,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
2
2
|
export interface AccountPillProps {
|
|
3
3
|
onPress: () => void;
|
|
4
|
-
onCopy: (address: string) => void;
|
|
5
4
|
address?: string;
|
|
6
5
|
profileName?: string;
|
|
7
6
|
profileImage?: string;
|
|
8
7
|
style?: StyleProp<ViewStyle>;
|
|
9
8
|
}
|
|
10
|
-
export declare function AccountPill({ onPress,
|
|
9
|
+
export declare function AccountPill({ onPress, address, profileName, profileImage, style }: AccountPillProps): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/composites/wui-account-pill/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AASnF,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/composites/wui-account-pill/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AASnF,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAID,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,OAAO,EACP,WAAW,EACX,YAAY,EACZ,KAAK,EACN,EAAE,gBAAgB,2CAsClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/composites/wui-account-pill/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/composites/wui-account-pill/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,wBAmBG"}
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@ export function Card({ children, style }: CardProps) {
|
|
|
18
18
|
enabled={Platform.OS === 'ios'}
|
|
19
19
|
style={[
|
|
20
20
|
styles.container,
|
|
21
|
-
{ backgroundColor: Theme['bg-100'], borderColor: Theme['gray-glass-
|
|
21
|
+
{ backgroundColor: Theme['bg-100'], borderColor: Theme['gray-glass-015'] },
|
|
22
22
|
style
|
|
23
23
|
]}
|
|
24
24
|
>
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { Animated, Pressable, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
2
|
import { Avatar } from '../wui-avatar';
|
|
3
3
|
import { UiUtil } from '../../utils/UiUtil';
|
|
4
|
-
import { IconLink } from '../wui-icon-link';
|
|
5
4
|
import { Text } from '../../components/wui-text';
|
|
6
5
|
import useAnimatedValue from '../../hooks/useAnimatedValue';
|
|
7
6
|
import { useTheme } from '../../hooks/useTheme';
|
|
8
7
|
import styles from './styles';
|
|
8
|
+
import { Icon } from '../../components/wui-icon';
|
|
9
9
|
|
|
10
10
|
export interface AccountPillProps {
|
|
11
11
|
onPress: () => void;
|
|
12
|
-
onCopy: (address: string) => void;
|
|
13
12
|
address?: string;
|
|
14
13
|
profileName?: string;
|
|
15
14
|
profileImage?: string;
|
|
@@ -20,7 +19,6 @@ const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
|
|
|
20
19
|
|
|
21
20
|
export function AccountPill({
|
|
22
21
|
onPress,
|
|
23
|
-
onCopy,
|
|
24
22
|
address,
|
|
25
23
|
profileName,
|
|
26
24
|
profileImage,
|
|
@@ -36,12 +34,6 @@ export function AccountPill({
|
|
|
36
34
|
const backgroundColor = animatedValue;
|
|
37
35
|
const borderColor = Theme['gray-glass-005'];
|
|
38
36
|
|
|
39
|
-
const handleCopyAddress = () => {
|
|
40
|
-
if (address) {
|
|
41
|
-
onCopy(address);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
37
|
return (
|
|
46
38
|
<AnimatedPressable
|
|
47
39
|
style={[styles.container, { backgroundColor, borderColor }, style]}
|
|
@@ -66,13 +58,7 @@ export function AccountPill({
|
|
|
66
58
|
truncate: 'middle'
|
|
67
59
|
})}
|
|
68
60
|
</Text>
|
|
69
|
-
<
|
|
70
|
-
icon="copy"
|
|
71
|
-
size="sm"
|
|
72
|
-
iconColor="fg-200"
|
|
73
|
-
onPress={handleCopyAddress}
|
|
74
|
-
style={styles.copyButton}
|
|
75
|
-
/>
|
|
61
|
+
<Icon name="chevronBottom" size="sm" color="fg-200" style={styles.copyButton} />
|
|
76
62
|
</AnimatedPressable>
|
|
77
63
|
);
|
|
78
64
|
}
|