-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbutton.js
72 lines (58 loc) · 1.3 KB
/
button.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
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/
import React from 'react';
import {
SafeAreaView,
View,
Text,
TextInput,
StatusBar,
StyleSheet,
Button,
TouchableOpacity
} from 'react-native';
class App extends React.Component {
constructor(props) {
super(props);
this.state ={
"inputValue":""
}
}
_onBtnPress() {
alert("cc")
}
render() {
return (
<>
<StatusBar barStyle="dark-content" />
<SafeAreaView style={{flex:1,backgroundColor:"gray"}}>
<View>
<Button title="登录"
onPress={
()=>{
this._onBtnPress()
}
}
></Button>
{/**包装可点击的内容 */}
<TouchableOpacity style={
{width:200,height:50,borderRadius:19,
backgroundColor:"red",justifyContent:"center",
alignItems:"center"
}
}>
<Text style={{fontSize:30,color:"blue"}}
>注册账号</Text>
</TouchableOpacity>
</View>
</SafeAreaView>
</>
);
};
}
export default App;