@@ -27,7 +27,7 @@ export default class Header extends NativeBaseComponent {
2727 shadowOpacity : 0.1 ,
2828 shadowRadius : 1.5 ,
2929 height : this . getTheme ( ) . toolbarHeight ,
30- elevation : 2
30+ elevation : 3
3131 } ,
3232 iosToolbarSearch : {
3333 backgroundColor : this . getTheme ( ) . toolbarInputColor ,
@@ -42,6 +42,9 @@ export default class Header extends NativeBaseComponent {
4242 borderColor : 'transparent' ,
4343 elevation : 2 ,
4444 flex :1
45+ } ,
46+ toolbarButton : {
47+ paddingHorizontal : 15
4548 }
4649 }
4750 }
@@ -95,41 +98,41 @@ export default class Header extends NativeBaseComponent {
9598
9699 if ( this . props . searchBar ) {
97100 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 } } >
99102 { React . cloneElement ( input [ 0 ] , { style : this . getInitialStyle ( ) . iosToolbarSearch , toolbar : true , key : 'inp' } ) }
100103 </ View > )
101104 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 } ) }
103106 </ View > )
104107 } 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 } } >
106109 { React . cloneElement ( input [ 0 ] , { style : this . getInitialStyle ( ) . androidToolbarSearch , atoolbar : true } ) }
107110 </ View > )
108111 }
109112 }
110113 else {
111114 if ( Platform . OS === 'ios' ) {
112115 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 } ) }
114117 </ View > )
115118 newChildren . push ( < View key = 'title' style = { { flex : 3 , alignSelf : 'center' , justifyContent : 'space-between' } } >
116119 { [ title [ 0 ] , subtitle [ 0 ] ] }
117120 </ View > )
118121 for ( let i = 1 ; i < buttons . length ; i ++ ) {
119122 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 } ) }
121124 </ View > )
122125 }
123126 } else {
124127 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 } ) }
126129 </ View > )
127130 newChildren . push ( < View key = 'title' style = { { flex : 3 , alignSelf : 'stretch' , justifyContent : 'center' } } >
128131 { [ title [ 0 ] ] }
129132 </ View > )
130133 for ( let i = 1 ; i < buttons . length ; i ++ ) {
131134 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 } ) }
133136 </ View > )
134137
135138 }
0 commit comments