Skip to content

Commit

Permalink
feat: use account icons as in home
Browse files Browse the repository at this point in the history
  • Loading branch information
sandipndev committed Jul 14, 2023
1 parent ae0d34e commit 67699e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/components/button-group/button-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Icon from "react-native-vector-icons/Ionicons"
type ButtonForButtonGroupProps = {
id: string
text: string
icon: string
icon: string | React.ReactElement
}

const ButtonForButtonGroup: React.FC<
Expand All @@ -20,7 +20,7 @@ const ButtonForButtonGroup: React.FC<
<TouchableWithoutFeedback onPress={onPress}>
<View style={styles.button}>
<Text style={styles.text}>{text}</Text>
<Icon style={styles.text} name={icon} />
{typeof icon === "string" ? <Icon style={styles.text} name={icon} /> : icon}
</View>
</TouchableWithoutFeedback>
)
Expand Down
10 changes: 6 additions & 4 deletions app/screens/receive-bitcoin-screen/receive-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useI18nContext } from "@app/i18n/i18n-react"
import { requestNotificationPermission } from "@app/utils/notifications"
import { useIsFocused, useNavigation } from "@react-navigation/native"
import React, { useEffect } from "react"
import { Pressable, TouchableOpacity, View } from "react-native"
import { TouchableOpacity, View } from "react-native"
import { testProps } from "../../utils/testProps"
import { withMyLnUpdateSub } from "./my-ln-updates-sub"
import { makeStyles, Text, useTheme } from "@rneui/themed"
Expand All @@ -17,6 +17,7 @@ import { AmountInput } from "@app/components/amount-input"
import { NoteInput } from "@app/components/note-input"
import Icon from "react-native-vector-icons/Ionicons"
import { SetLightningAddressModal } from "@app/components/set-lightning-address-modal"
import { GaloyCurrencyBubble } from "@app/components/atomic/galoy-currency-bubble"

const ReceiveScreen = () => {
const {
Expand Down Expand Up @@ -94,12 +95,12 @@ const ReceiveScreen = () => {
{
id: WalletCurrency.Btc,
text: LL.ReceiveScreen.bitcoin(),
icon: "logo-bitcoin",
icon: <GaloyCurrencyBubble currency="BTC" iconSize={16} />,
},
{
id: WalletCurrency.Usd,
text: LL.ReceiveScreen.stablesats(),
icon: "logo-usd",
icon: <GaloyCurrencyBubble currency="USD" iconSize={16} />,
},
]}
onPress={(id) => request.setReceivingWallet(id as WalletCurrency)}
Expand Down Expand Up @@ -263,12 +264,13 @@ const useStyles = makeStyles(({ colors }) => ({
justifyContent: "center",
alignItems: "center",
marginBottom: 15,
height: 16,
},
invoiceActions: {
flexDirection: "row",
justifyContent: "center",
marginBottom: 10,
height: 20,
height: 16,
},
copyInvoiceContainer: {
flex: 2,
Expand Down

0 comments on commit 67699e1

Please sign in to comment.