Commit aafda65f authored by Pramodh Rajapakse's avatar Pramodh Rajapakse

add bid component completed

parent bf90e464
import React from 'react'; import React from 'react';
import { StyleSheet, TouchableOpacity, Text, View, TextInput } from 'react-native'; import { StyleSheet, TouchableOpacity, View, TextInput } from 'react-native';
import themeColors from '../assets/colors'; import themeColors from '../assets/colors';
import { AppTextInput } from './text_input.component'; import { MaterialIcons} from "@expo/vector-icons";
export const AppAddBid = (props) => { export const AppAddBid = (props) => {
return( return(
<View style={styles.bidContainer}> <View style={styles.bidContainer}>
<AppTextInput/> <TextInput style={styles.input} keyboardType='number-pad' placeholder='Enter bid'/>
<TouchableOpacity onPress={props.onPress} style={styles.bid}> <TouchableOpacity onPress={props.onPress} style={styles.bid}>
<Text style={styles.label}>Bid</Text> <MaterialIcons name="add" size={16} color={themeColors.WHITE} />
</TouchableOpacity> </TouchableOpacity>
</View> </View>
) )
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
bidContainer: { bidContainer: {
flex: 1, flex: 1,
marginVertical: 10,
flexDirection: 'row', flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between', justifyContent: 'space-between',
paddingHorizontal: 20 paddingHorizontal: 20,
borderRadius: 20,
borderWidth: 1,
borderColor: themeColors.TERTIARY_COLOR,
maxHeight: 50
}, },
bid:{ bid:{
alignItems: "center", alignItems: "center",
padding: 10, padding: 8,
fontSize: 16,
backgroundColor: themeColors.PRIMARY_COLOR, backgroundColor: themeColors.PRIMARY_COLOR,
borderRadius: 20, borderRadius: 20,
shadowColor: 'rgba(0,0,0, .4)', shadowColor: 'rgba(0,0,0, .4)',
...@@ -33,11 +36,13 @@ const styles = StyleSheet.create({ ...@@ -33,11 +36,13 @@ const styles = StyleSheet.create({
shadowOpacity: 1, shadowOpacity: 1,
shadowRadius: 1, shadowRadius: 1,
elevation: 2, elevation: 2,
marginVertical: 10 height: 33
}, },
label: { input:{
fontSize: 20, alignItems: "center",
color: themeColors.WHITE padding: 10,
fontSize: 16,
width: '80%'
} }
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment