-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGirl.js
More file actions
45 lines (42 loc) · 865 Bytes
/
Girl.js
File metadata and controls
45 lines (42 loc) · 865 Bytes
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
import React,{ Component } from 'react';
import {
View,
Text,
StyleSheet
} from 'react-native';
export default class Girl extends Component{
constructor(props) {
super(props);
this.state = {
}
}
render() {
return (
<View style={styles.container}>
<Text style={styles.text}>
im a girl.
</Text>
<Text style={styles.text}>
我收到了男孩送的:{this.props.word}
</Text>
<Text style={styles.text}
onPress={() => {
this.props.onCallBack('一盒巧克力');
this.props.navigator.pop();
}}>
回赠巧克力
</Text>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'gray',
justifyContent: 'center'
},
text: {
fontSize: 20
}
})