RN 0.41, native-base 2.0.5.
Text/Icon inside Button stays centered after changing it's width/height.
Text/Icon doesn't stay centered.
<Button>
<Text>Login</Text>
</Button
Present on both iOS and Android
Nada?
Just add justifyContent: 'center', to your styles.
I am having the same problem. Here is my code:-
<Button transparent>
<Icon name="ios-heart-outline" style={{color:'#000'}} />
</Button>
I have tested it on an android device. I even tried justifyContent: 'center' on the button, but that does not seem to work.
NativeBase version in my package.json is:
"native-base": "^2.4.3",
Most helpful comment
Just add
justifyContent: 'center', to your styles.