Commit e0639065 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo
parents c16a11f0 0885de3e
...@@ -30,29 +30,35 @@ class ItemShoping extends React.Component { ...@@ -30,29 +30,35 @@ class ItemShoping extends React.Component {
// console.log(this.props) // console.log(this.props)
return ( return (
<View style={{ flex: 1, margin: 10 }} key={item.id}> <View style={{ flex: 1 }} key={item.id}>
{/* <Text style={{ fontSize: 20, color: '#c9af6d' }}>{item.name}</Text> */} {/* <Text style={{ fontSize: 20, color: '#c9af6d' }}>{item.name}</Text> */}
<View style={{ flexDirection: 'row' }}> <View style={{ flex: 1, flexDirection: 'row', height: 100, marginVertical:10}}>
<View > <View style={{ flex: 1, height: 100 }}>
<Image source={{ uri: item.image }} style={{ height: 100, width: 100, borderRadius: 5, top: 5 }}></Image> <TouchableOpacity onPress={() => this.props.navigation.navigate('Menu Detail', { nameMenu: item.name, desc: item.description, image: item.image })}>
<Image source={{ uri: item.image }} style={{ height: 100, width: 100, borderRadius: 10, }}></Image>
</TouchableOpacity>
</View>
<View style={{ flex: 2, height: 150 }}>
<View style={{ marginLeft: 5, marginRight: 5 }}>
<Text style={{ fontSize: 14, margin: 5, marginRight: 10, fontFamily: 'Gotham-Black', color:'#838383' }}>{item.name}</Text>
<NumberFormat decimalScale={0} value={item.price} renderText={value => <Text style={{ fontSize: 12, margin: 5, marginRight: 10, fontFamily: 'Gotham-Black', color:'#838383' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
</View> </View>
<View > <View style={{ marginLeft: 5, marginRight: 5, flexDirection: 'row' }}>
<Text style={{ fontSize: 15, margin: 5, marginRight: 10, fontFamily: 'Gotham-Black', color: 'grey' }}>{item.name}</Text> <TouchableOpacity onPress={() => this.handleAddDescription()}>
<NumberFormat decimalScale={0} value={item.price} renderText={value => <Text style={{ fontSize: 12, margin: 5, marginRight: 10, fontFamily: 'Gotham-Light', color: 'grey' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
<View style={{ flexDirection: 'row', flex: 1 }}>
<View style={styles.shadowEdit}> <View style={styles.shadowEdit}>
<Image source={(require('../assets/icon/icon-pencil.png'))} style={{ height: 25, width: 25, marginLeft: 5}}></Image> <Image source={(require('../assets/icon/icon-pencil.png'))} style={{ height: 25, width: 25, marginLeft: 5, marginRight: 5 }}></Image>
</View> </View>
</TouchableOpacity>
<View style={styles.shadowAdd}> <View style={styles.shadowAdd}>
<TouchableOpacity onPress={() => this.props.handleMin()}> <TouchableOpacity style={{ alignSelf: 'center' }} onPress={() => this.props.handleMin()}>
<Text style={{ fontSize: 20, margin: 2, color: '#CFB368' }}> - </Text> <Text style={{ fontSize: 25, alignSelf: 'center', fontFamily: 'Gotham-Light', color: '#CFB368' }}> - </Text>
</TouchableOpacity> </TouchableOpacity>
<TextInput <TextInput
style={{ height: 25, padding: 2, textAlign: 'center', margin: 2 }} style={{ padding: 2, textAlign: 'center', fontFamily: 'Gotham-Black', color:'#838383', fontSize: 14, marginRight: 5, marginLeft: 5 }}
keyboardType={'numeric'} keyboardType={'numeric'}
onChangeText={(quantity) => this.handleChangeQuantity(item, quantity)}>{item.quantity}</TextInput> onChangeText={(quantity) => this.handleChangeQuantity(item, quantity)}>{item.quantity}</TextInput>
<TouchableOpacity onPress={() => this.props.handleAdd()}> <TouchableOpacity style={{ alignSelf: 'center' }} onPress={() => this.props.handleAdd()}>
<Text style={{ fontSize: 20, margin: 2, color: '#CFB368' }}> + </Text> <Text style={{ fontSize: 25, alignSelf: 'center', fontFamily: 'Gotham-Light', color: '#CFB368' }}> + </Text>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
...@@ -66,7 +72,7 @@ class ItemShoping extends React.Component { ...@@ -66,7 +72,7 @@ class ItemShoping extends React.Component {
const styles = StyleSheet.create({ const styles = StyleSheet.create({
shadowEdit: { shadowEdit: {
height: 30, height: 30,
width: 25, width: 40,
borderWidth: 1, borderWidth: 1,
borderRadius: 2, borderRadius: 2,
borderColor: '#ddd', borderColor: '#ddd',
...@@ -78,12 +84,11 @@ const styles = StyleSheet.create({ ...@@ -78,12 +84,11 @@ const styles = StyleSheet.create({
elevation: 1, elevation: 1,
marginLeft: 5, marginLeft: 5,
marginRight: 5, marginRight: 5,
marginTop: 10, marginTop: 5,
alignItems:'center'
}, },
shadowAdd: { shadowAdd: {
height: 30, height: 30,
width: 75, width: 90,
borderWidth: 1, borderWidth: 1,
borderRadius: 2, borderRadius: 2,
borderColor: '#ddd', borderColor: '#ddd',
...@@ -95,7 +100,7 @@ const styles = StyleSheet.create({ ...@@ -95,7 +100,7 @@ const styles = StyleSheet.create({
elevation: 1, elevation: 1,
marginLeft: 5, marginLeft: 5,
marginRight: 5, marginRight: 5,
marginTop: 10, marginTop: 5,
flexDirection: 'row' flexDirection: 'row'
}, },
shadowMin: { shadowMin: {
......
This diff is collapsed.
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