import { useSnapshot } from 'valtio'; import { ThemeController } from '@reown/appkit-core-react-native'; import { type OnRampPaymentMethod } from '@reown/appkit-common-react-native'; import { Pressable, FlexView, Spacing, Text, useTheme, Image, BorderRadius, IconBox } from '@reown/appkit-ui-react-native'; import { StyleSheet } from 'react-native'; export const ITEM_SIZE = 100; interface Props { onPress: (item: OnRampPaymentMethod) => void; item: OnRampPaymentMethod; selected: boolean; testID?: string; } export function PaymentMethod({ onPress, item, selected, testID }: Props) { const Theme = useTheme(); const { themeMode } = useSnapshot(ThemeController.state); const handlePress = () => { onPress(item); }; return ( {selected ? ( ) : null} {item.name} ); } const styles = StyleSheet.create({ container: { height: ITEM_SIZE, width: 85, alignItems: 'center' }, logoContainer: { width: 60, height: 60, borderRadius: BorderRadius.full, marginBottom: Spacing['4xs'] }, logo: { width: 26, height: 26 }, checkmark: { borderRadius: BorderRadius.full, position: 'absolute', bottom: 0, right: -10 }, text: { marginTop: Spacing.xs, paddingHorizontal: Spacing['3xs'], textAlign: 'center' } });