From 4446fdf176f3f8c9c428f555da14beb0eb126d6f Mon Sep 17 00:00:00 2001 From: juan Date: Mon, 17 Apr 2023 19:59:35 +0200 Subject: [PATCH] icons updates --- src/components/avatar/ENSDomainIcon.tsx | 74 ++++++++++++++++--- .../avatar/UnstoppableDomainIcon.tsx | 45 +++++++---- .../wallet/components/ShareAddressModal.tsx | 6 +- src/navigation/wallet/screens/send/SendTo.tsx | 5 +- 4 files changed, 99 insertions(+), 31 deletions(-) diff --git a/src/components/avatar/ENSDomainIcon.tsx b/src/components/avatar/ENSDomainIcon.tsx index 7f1081a4e3..9387fb0948 100644 --- a/src/components/avatar/ENSDomainIcon.tsx +++ b/src/components/avatar/ENSDomainIcon.tsx @@ -1,22 +1,46 @@ import React from 'react'; -import Svg, {Defs, LinearGradient, Path, Stop} from 'react-native-svg'; +import Svg, {Circle, Defs, LinearGradient, Path, Stop} from 'react-native-svg'; interface ENSDomainIconProps { size?: number; + showBackground?: boolean; } const ENSDomainIcon: React.FC = props => { - let {size = 20} = props; + const {size = 20, showBackground = true} = props; + const viewBox = showBackground ? '0 0 20 20' : '0 0 18 21'; return ( - + + + + + + + + + + + @@ -24,10 +48,36 @@ const ENSDomainIcon: React.FC = props => { - + {showBackground ? ( + <> + + + + + + + + ) : ( + + )} ); }; diff --git a/src/components/avatar/UnstoppableDomainIcon.tsx b/src/components/avatar/UnstoppableDomainIcon.tsx index 40f45cc822..4969a10fcc 100644 --- a/src/components/avatar/UnstoppableDomainIcon.tsx +++ b/src/components/avatar/UnstoppableDomainIcon.tsx @@ -1,26 +1,41 @@ import React from 'react'; -import * as Svg from 'react-native-svg'; - +import Svg, {Circle, Path} from 'react-native-svg'; interface UnstoppableDomainIconProps { size?: number; + showBackground?: boolean; } const UnstoppableDomainIcon: React.FC = props => { - const {size = 20} = props; + const {size = 20, showBackground = true} = props; return ( - <> - - - - - + + {showBackground ? ( + <> + + + + + ) : ( + <> + + + + )} + ); }; diff --git a/src/navigation/wallet/components/ShareAddressModal.tsx b/src/navigation/wallet/components/ShareAddressModal.tsx index a13c59e978..84bb65a462 100644 --- a/src/navigation/wallet/components/ShareAddressModal.tsx +++ b/src/navigation/wallet/components/ShareAddressModal.tsx @@ -158,12 +158,12 @@ const ShareAddressModal = ({ shareAddress(domain.domainName)}> {domain.domainType === 'ENSDomain' ? ( - + ) : ( - + )} - {domain} + {domain.domainName} { useEffect(() => { return navigation.addListener('blur', () => - setTimeout(() => setSearchInput(''), 300), + setTimeout(() => { + setSearchInput(''); + setDomain(undefined); + }, 300), ); }, [navigation]);