halilb / react-native-textinput-effects

Text inputs with custom label and icon animations for iOS and android. Built with react native and inspired by Codrops.
MIT License
2.99k stars 293 forks source link

You should add alignSelf: 'stretch' styles #6

Closed melihmucuk closed 8 years ago

melihmucuk commented 8 years ago

Thanks for awesome component! I think you should add alignSelf: 'stretch' to all examples.

<Fumi
    style={{alignSelf: 'stretch'}}
    label={'Course Name'}
    iconClass={FontAwesomeIcon}
    iconName={'university'}
    iconColor={'#f95a25'}
/>

code samples and ss for without stretch:

<View style={{flex: 1, alignSelf: 'stretch', justifyContent: 'center', alignItems:'center', backgroundColor: 'red'}}>
          <Text style={{color: 'white', fontSize: 20, fontWeight: 'bold'}}>
            Test
          </Text>
          <Fumi
            label={'Course Name'}
            iconClass={FontAwesomeIcon}
            iconName={'university'}
            iconColor={'#f95a25'}
            />
</View>

simulator screen shot 22 aug 2016 11 32 17

with alignSelf: 'stretch'

simulator screen shot 22 aug 2016 11 33 01

halilb commented 8 years ago

Thanks for reporting @melihmucuk.

I tested the problem but couldn't reproduce. It's possible it has broken with certain react-native version. I've tested and it's working fine with react-native 0.36.1.

Closing the issue now but let me know if you still experience the problem!