Nativebase: Button Text/Icon doesn't stay centered when providing width/height

Created on 9 Feb 2017  路  3Comments  路  Source: GeekyAnts/NativeBase

react-native, react and native-base version

RN 0.41, native-base 2.0.5.

Expected behaviour

Text/Icon inside Button stays centered after changing it's width/height.

Actual behaviour

Text/Icon doesn't stay centered.

Steps to reproduce (code snippet or screenshot)

<Button> <Text>Login</Text> </Button

Is the bug present in both ios and android or in any one of them?

Present on both iOS and Android

Most helpful comment

Just add justifyContent: 'center', to your styles.

All 3 comments

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",

Was this page helpful?
0 / 5 - 0 ratings

Related issues

inv2004 picture inv2004  路  3Comments

natashache picture natashache  路  3Comments

natashache picture natashache  路  3Comments

aloifolia picture aloifolia  路  3Comments

Cotel picture Cotel  路  3Comments