rendering icon in coinDetailsScreen

This commit is contained in:
Nouman Tahir 2022-12-02 19:05:16 +05:00
parent 4e25b63f55
commit 44275c34d4
3 changed files with 9 additions and 0 deletions

View File

@ -9,6 +9,10 @@ export default EStyleSheet.create({
overflow: 'hidden',
backgroundColor: '$primaryLightBackground',
} as ViewStyle,
iconContainer:{
marginBottom:16,
marginTop:8
} as ViewStyle,
basicsContainer: {
alignItems: 'center',
padding: 16,

View File

@ -1,6 +1,7 @@
import React, { Fragment } from 'react';
import { useIntl } from 'react-intl';
import { View, Text } from 'react-native';
import { AssetIcon } from '../../../components/atoms';
import { DataPair } from '../../../redux/reducers/walletReducer';
import styles from './children.styles';
@ -9,6 +10,7 @@ interface CoinBasicsProps {
extraData: DataPair[];
coinSymbol: string;
percentChange: number;
iconUrl?: string;
onInfoPress: (id: string) => void;
}
@ -17,11 +19,13 @@ export const CoinBasics = ({
extraData,
coinSymbol,
percentChange,
iconUrl,
onInfoPress,
}: CoinBasicsProps) => {
const intl = useIntl();
const _renderCoinHeader = (
<>
{iconUrl && <AssetIcon iconUrl={iconUrl} iconSize={56} containerStyle={styles.iconContainer} isEngine={true} />}
<View style={styles.coinTitleContainer}>
<Text style={styles.textCoinTitle}>{coinSymbol}</Text>
</View>

View File

@ -50,6 +50,7 @@ export const CoinSummary = ({
return (
<View>
<CoinBasics
iconUrl={coinData.iconUrl}
valuePairs={valuePairs}
extraData={extraDataPairs}
coinSymbol={coinSymbol}