-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOrderScreen.js
145 lines (129 loc) · 3.88 KB
/
OrderScreen.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
import React, { Component } from 'react';
import { StyleSheet, View ,Button,Text,Image }from 'react-native';
import { NavigationActions } from 'react-navigation';
import OrderButton from './components/OrderButton';
export default class OrderScreen extends Component {
static navigationOptions = {
title: 'Order Screen',
};
constructor(props) {
super(props);
}
handlePress = (value) => {
switch (value){
case 1 :
this.props.navigation.state = {key:'screen2'}
this.props.navigation.navigate('Notification', { })
break;
case 2 :
const resetAction = NavigationActions.reset({
index: 0,
actions: [
NavigationActions.navigate({ routeName: 'Home'})
]
})
this.props.navigation.dispatch(resetAction)
break;
}
}
render() {
return (
<View style={styles.container}>
<View style={styles.textContainer}>
<View style={styles.textContainer2}>
<Text > option Item</Text>
<Text> filter Item</Text>
</View>
<View style={styles.textContainer2}>
<Text style={styles.textItem}> S E P H O R A</Text>
</View>
</View>
<View style={styles.textContainer1}>
<Text style={styles.textItem1} > some text is placed here</Text>
</View>
<View style={styles.imageContainer}>
<View style={styles.imageContainer1}>
<Image style={styles.imageItem} source = {require('./image/stila.jpg')}/>
<Text>some text here</Text>
</View>
<View style={styles.imageContainer1}>
<Image style={styles.imageItem} source = {require('./image/bottle.jpg')}/>
<Text>some text here</Text>
</View>
</View>
<View style={styles.buttonContainer}>
<OrderButton text="Place Multi Item Cosmetics Order" id = {1} onPress ={ this.handlePress }/>
<OrderButton text="Place Single Item Order" id = {2} onPress ={ this.handlePress } />
</View>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
textContainer:{
flexDirection: 'column',
flexWrap:'wrap',
alignItems:'center',
flex:15,
backgroundColor:'white'
},
textContainer1:{
borderTopWidth:5,
borderTopColor:'black',
borderBottomColor:'black',
borderBottomWidth:5,
flex:15,
backgroundColor:'white'
},
textContainer2:{
flex:1,
marginTop:10,
marginLeft:10,
marginRight:5,
flexDirection:'row',
justifyContent:'space-around',
alignItems:'center'
},
imageContainer:{
flex:50,
flexDirection: 'row',
backgroundColor:'white',
alignItems:'center',
flexWrap:'wrap'
},
imageContainer1:{
flex:50,
flexDirection: 'column',
backgroundColor:'white',
justifyContent:'space-around',
alignItems:'center'
},
buttonContainer:{
flex:20,
flexDirection:'row',
flexWrap:'wrap',
justifyContent:'space-between',
alignItems:'center',
backgroundColor:'white'
},
textItem:{
color: 'black',
fontSize:30,
marginBottom:3
},
textItem1:{
marginTop:5,
color: 'black',
fontSize:15,
justifyContent:'center',
alignSelf:'center'
},
imageItem:{
width:200,
height:270,
padding:10
}
});