BlueWallet/components/LdkButton.js

38 lines
1.4 KiB
JavaScript
Raw Normal View History

2021-09-09 12:00:11 +01:00
/* eslint react/prop-types: "off", react-native/no-inline-styles: "off" */
2023-10-23 21:28:44 -04:00
2021-09-09 12:00:11 +01:00
import { Image, TouchableOpacity, View } from 'react-native';
import { Text } from 'react-native-elements';
import React from 'react';
2023-10-23 21:28:44 -04:00
import { useTheme } from './themes';
2021-09-09 12:00:11 +01:00
export const LdkButton = props => {
const { colors } = useTheme();
return (
<TouchableOpacity accessibilityRole="button" onPress={props.onPress}>
2021-09-09 12:00:11 +01:00
<View
style={{
borderColor: (props.active && colors.lnborderColor) || colors.buttonDisabledBackgroundColor,
borderWidth: 1.5,
borderRadius: 8,
backgroundColor: colors.buttonDisabledBackgroundColor,
minWidth: props.style.width,
minHeight: props.style.height,
height: props.style.height,
flex: 1,
marginBottom: 8,
}}
>
<View style={{ marginHorizontal: 16, marginVertical: 10, flexDirection: 'row', alignItems: 'center' }}>
<View>
<Image style={{ width: 34, height: 34, marginRight: 8 }} source={require('../img/addWallet/lightning.png')} />
</View>
<View>
2021-09-24 15:50:06 +01:00
<Text style={{ color: colors.lnborderColor, fontWeight: 'bold', fontSize: 18 }}>{props.text || '?'}</Text>
<Text style={{ color: colors.alternativeTextColor, fontSize: 13, fontWeight: '500' }}>{props.subtext || '?'}</Text>
2021-09-09 12:00:11 +01:00
</View>
</View>
</View>
</TouchableOpacity>
);
};