@@ -27,7 +27,7 @@ export default class Header extends NativeBaseComponent {
27
27
shadowOpacity : 0.1 ,
28
28
shadowRadius : 1.5 ,
29
29
height : this . getTheme ( ) . toolbarHeight ,
30
- elevation : 2
30
+ elevation : 3
31
31
} ,
32
32
iosToolbarSearch : {
33
33
backgroundColor : this . getTheme ( ) . toolbarInputColor ,
@@ -42,6 +42,9 @@ export default class Header extends NativeBaseComponent {
42
42
borderColor : 'transparent' ,
43
43
elevation : 2 ,
44
44
flex :1
45
+ } ,
46
+ toolbarButton : {
47
+ paddingHorizontal : 15
45
48
}
46
49
}
47
50
}
@@ -95,41 +98,41 @@ export default class Header extends NativeBaseComponent {
95
98
96
99
if ( this . props . searchBar ) {
97
100
if ( Platform . OS === 'ios' ) {
98
- newChildren . push ( < View key = 'search' style = { { flex : 1 , alignSelf : 'stretch' , alignItems : ' center', justifyContent : 'flex-start' , flexDirection : 'row' , marginLeft : - 7 } } >
101
+ newChildren . push ( < View key = 'search' style = { { flex : 1 , alignSelf : 'center' , justifyContent : 'flex-start' , flexDirection : 'row' , marginLeft : - 7 } } >
99
102
{ React . cloneElement ( input [ 0 ] , { style : this . getInitialStyle ( ) . iosToolbarSearch , toolbar : true , key : 'inp' } ) }
100
103
</ View > )
101
104
newChildren . push ( < View key = 'searchBtn' style = { { alignItems : 'center' , justifyContent : 'center' , flexDirection : 'row' , marginRight : - 14 } } >
102
- { React . cloneElement ( buttons [ 0 ] , { color : this . getTheme ( ) . iosToolbarBtnColor } ) }
105
+ { React . cloneElement ( buttons [ 0 ] , { color : this . getTheme ( ) . iosToolbarBtnColor , style : this . getInitialStyle ( ) . toolbarButton } ) }
103
106
</ View > )
104
107
} else {
105
- newChildren . push ( < View key = 'search' style = { { flex : 1 , alignItems : 'center' , paddingBottom : 4 , justifyContent : 'flex-start' , flexDirection : 'row' , marginLeft : - 8 , marginRight : - 8 } } >
108
+ newChildren . push ( < View key = 'search' style = { { flex : 1 , alignSelf : 'center' , justifyContent : 'flex-start' , flexDirection : 'row' , marginLeft : - 8 , marginRight : - 8 } } >
106
109
{ React . cloneElement ( input [ 0 ] , { style : this . getInitialStyle ( ) . androidToolbarSearch , atoolbar : true } ) }
107
110
</ View > )
108
111
}
109
112
}
110
113
else {
111
114
if ( Platform . OS === 'ios' ) {
112
115
newChildren . push ( < View key = 'btn1' style = { { alignItems : 'center' , justifyContent : 'flex-start' , flexDirection : 'row' , marginLeft : - 14 } } >
113
- { React . cloneElement ( buttons [ 0 ] , { color : this . getTheme ( ) . iosToolbarBtnColor } ) }
116
+ { React . cloneElement ( buttons [ 0 ] , { color : this . getTheme ( ) . iosToolbarBtnColor , style : this . getInitialStyle ( ) . toolbarButton } ) }
114
117
</ View > )
115
118
newChildren . push ( < View key = 'title' style = { { flex : 3 , alignSelf : 'center' , justifyContent : 'space-between' } } >
116
119
{ [ title [ 0 ] , subtitle [ 0 ] ] }
117
120
</ View > )
118
121
for ( let i = 1 ; i < buttons . length ; i ++ ) {
119
122
newChildren . push ( < View key = { 'btn' + ( i + 1 ) } style = { { alignItems : 'center' , justifyContent : 'flex-start' , flexDirection : 'row' , marginRight : - 14 } } >
120
- { React . cloneElement ( buttons [ i ] , { color : this . getTheme ( ) . iosToolbarBtnColor } ) }
123
+ { React . cloneElement ( buttons [ i ] , { color : this . getTheme ( ) . iosToolbarBtnColor , style : this . getInitialStyle ( ) . toolbarButton } ) }
121
124
</ View > )
122
125
}
123
126
} else {
124
127
newChildren . push ( < View key = 'btn1' style = { { alignItems : 'center' , justifyContent : 'flex-start' , flexDirection : 'row' , marginLeft : - 10 , marginRight : 12 } } >
125
- { buttons [ 0 ] }
128
+ { React . cloneElement ( buttons [ 0 ] , { style : this . getInitialStyle ( ) . toolbarButton } ) }
126
129
</ View > )
127
130
newChildren . push ( < View key = 'title' style = { { flex : 3 , alignSelf : 'stretch' , justifyContent : 'center' } } >
128
131
{ [ title [ 0 ] ] }
129
132
</ View > )
130
133
for ( let i = 1 ; i < buttons . length ; i ++ ) {
131
134
newChildren . push ( < View key = { 'btn' + ( i + 1 ) } style = { { alignItems : 'center' , justifyContent : 'flex-start' , flexDirection : 'row' , marginRight : - 7 } } >
132
- { buttons [ i ] }
135
+ { React . cloneElement ( buttons [ i ] , { style : this . getInitialStyle ( ) . toolbarButton } ) }
133
136
</ View > )
134
137
135
138
}
0 commit comments