Pending Rewards #467

Merged
akinwale merged 3 commits from pending-rewards into master 2019-03-11 09:47:15 +01:00
2 changed files with 34 additions and 9 deletions
Showing only changes of commit dda067e729 - Show all commits

View file

@ -16,13 +16,20 @@ class FloatingWalletBalance extends React.PureComponent<Props> {
const { balance, navigation } = this.props; const { balance, navigation } = this.props;
return ( return (
<TouchableOpacity style={[floatingButtonStyle.container, floatingButtonStyle.bottomRight]} <View style={[floatingButtonStyle.view, floatingButtonStyle.bottomRight]}>
onPress={() => navigation && navigation.navigate({ routeName: 'WalletStack' })}> <TouchableOpacity style={floatingButtonStyle.container}
{isNaN(balance) && <ActivityIndicator size="small" color={Colors.White} />} onPress={() => navigation && navigation.navigate({ routeName: 'WalletStack' })}>
<Text style={floatingButtonStyle.text}> {isNaN(balance) && <ActivityIndicator size="small" color={Colors.White} />}
{(balance || balance === 0) && (formatCredits(parseFloat(balance), 2) + ' LBC')} <Text style={floatingButtonStyle.text}>
</Text> {(balance || balance === 0) && (formatCredits(parseFloat(balance), 2) + ' LBC')}
</TouchableOpacity> </Text>
</TouchableOpacity>
<TouchableOpacity style={floatingButtonStyle.pendingContainer}>
<Text style={floatingButtonStyle.text}>
get 40
</Text>
</TouchableOpacity>
</View>
); );
} }
} }

View file

@ -2,8 +2,15 @@ import { StyleSheet } from 'react-native';
import Colors from './colors'; import Colors from './colors';
const floatingButtonStyle = StyleSheet.create({ const floatingButtonStyle = StyleSheet.create({
container: { view: {
position: 'absolute', position: 'absolute',
zIndex: 100,
borderRadius: 24,
padding: 14,
justifyContent: 'flex-end',
flexDirection: 'row'
},
container: {
zIndex: 100, zIndex: 100,
borderRadius: 24, borderRadius: 24,
padding: 14, padding: 14,
@ -11,7 +18,7 @@ const floatingButtonStyle = StyleSheet.create({
paddingRight: 20, paddingRight: 20,
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
backgroundColor: Colors.BrighterLbryGreen, backgroundColor: Colors.LbryGreen,
shadowColor: 'black', shadowColor: 'black',
shadowOpacity: 0.1, shadowOpacity: 0.1,
shadowRadius: StyleSheet.hairlineWidth, shadowRadius: StyleSheet.hairlineWidth,
@ -20,6 +27,17 @@ const floatingButtonStyle = StyleSheet.create({
}, },
elevation: 4 elevation: 4
}, },
pendingContainer: {
borderRadius: 24,
padding: 14,
paddingLeft: 70,
paddingRight: 20,
marginLeft: -60,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: Colors.BrighterLbryGreen,
elevation: 3
},
text: { text: {
color: Colors.White, color: Colors.White,
fontFamily: 'Inter-UI-Bold', fontFamily: 'Inter-UI-Bold',