-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
56 lines (53 loc) · 1.42 KB
/
App.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
import { StyleSheet, SafeAreaView, Platform, ScrollView } from 'react-native';
import PokemonCard from './components/PokemonCard';
export default function App() {
const charmanderData = {
name: '#04 Charmander',
image: require('./assets/charmander.png'),
type: 'Fire',
hp: 39,
moves: ['Scratch', 'Ember', 'Growl', 'Leer'],
weaknesses: ['Water', 'Rock'],
};
const squirtleData = {
name: '#07 Squirtle',
image: require('./assets/squirtle.png'),
type: 'Water',
hp: 44,
moves: ['Tackle', 'Water Gun', 'Tail Whip', 'Withdraw'],
weaknesses: ['Electric', 'Grass'],
};
const bulbasaurData = {
name: '#01 Bulbasaur',
image: require('./assets/bulbasaur.png'),
type: 'Grass',
hp: 45,
moves: ['Tackle', 'Vine Whip', 'Growl', 'Leech Seed'],
weaknesses: ['Fire', 'Ice', 'Flying', 'Psychic'],
};
const pikachuData = {
name: '#25 Pikachu',
image: require('./assets/pikachu.png'),
type: 'Electric',
hp: 35,
moves: ['Quick Attack', 'Thunderbolt', 'Tail Whip', 'Growl'],
weaknesses: ['Ground'],
};
return (
<SafeAreaView style={styles.container}>
<ScrollView>
<PokemonCard {...bulbasaurData} />
<PokemonCard {...pikachuData} />
<PokemonCard {...charmanderData} />
<PokemonCard {...squirtleData} />
</ScrollView>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#f5f5f5',
paddingTop: Platform.OS === 'android' ? 25 : 0,
},
});