-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
64 lines (56 loc) · 1.17 KB
/
App.js
File metadata and controls
64 lines (56 loc) · 1.17 KB
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
import React from 'react';
import { StyleSheet, Text, View, Button } from 'react-native';
import Inicio from './Inicio';
import Caja2 from './Caja2';
import Caja3 from './Caja3';
//export default
class App extends React.Component {
constructor(){
super();
this.state = {
numero:10
}
}
aumentar = () =>{
this.state.numero++;
this.setState({
numero:this.state.numero
})
}
disminuir = () =>{
this.state.numero--;
this.setState({
numero:this.state.numero
})
}
render() {
return (
<View style={styles.container}>
<Inicio name="Calculadora" />
<Caja2 valor={this.state.numero} />
<Caja3 aumentar={this.aumentar} disminuir={this.disminuir} />
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
},
cajaUno:{
flex:1,
backgroundColor: "#DAF7A6",
alignItems:"center",
justifyContent:"center"
}
// cajaTres:{
// flex:1,
// padding:65,
// backgroundColor: "#581845",
// justifyContent:"space-between",
// flexDirection:"row",
// alignItems:"center"
// }
});
export default App;