File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 1
1
import {
2
2
StyleSheet ,
3
3
Text ,
4
+ View ,
4
5
} from 'react-native' ;
5
6
import React , { PropTypes } from 'react' ;
6
7
import clrs from '../utils/clrs' ;
7
8
8
9
const Header = ( { style, children } ) => {
9
10
return (
10
- < Text style = { [ styles . header , style ] } >
11
- { children }
12
- </ Text >
11
+ < View style = { styles . container } >
12
+ < Text style = { [ styles . text , style ] } >
13
+ { children }
14
+ </ Text >
15
+ </ View >
13
16
) ;
14
17
} ;
15
18
16
19
export default Header ;
17
20
18
21
const styles = StyleSheet . create ( {
19
- header : {
20
- fontWeight : '600' ,
21
- fontSize : 12 ,
22
+ container : {
22
23
paddingVertical : 4 ,
23
24
paddingHorizontal : 16 ,
24
- justifyContent : 'center' ,
25
- alignItems : 'center' ,
26
25
backgroundColor : clrs . lightGray ,
26
+ } ,
27
+ text : {
28
+ fontWeight : '600' ,
29
+ fontSize : 12 ,
27
30
color : clrs . white ,
28
31
borderColor : clrs . lightGray ,
29
32
} ,
Original file line number Diff line number Diff line change 2
2
StyleSheet ,
3
3
View ,
4
4
ListView ,
5
+ Platform ,
5
6
} from 'react-native' ;
6
7
import Immutable , { List } from 'immutable' ;
7
8
import React , { Component , PropTypes } from 'react' ;
@@ -14,6 +15,8 @@ import clrs from '../utils/clrs';
14
15
import * as actions from '../actions' ;
15
16
import { filteredPokemon } from '../selectors' ;
16
17
18
+ const Spacer = Platform . OS === 'ios' ? < KeyboardSpacer /> : null ;
19
+
17
20
18
21
class Pokedex extends Component {
19
22
constructor ( props ) {
@@ -47,7 +50,7 @@ class Pokedex extends Component {
47
50
48
51
< SearchBar onChange = { filter } value = { query } />
49
52
50
- < KeyboardSpacer />
53
+ { Spacer }
51
54
52
55
</ View >
53
56
</ Loader >
You can’t perform that action at this time.
0 commit comments