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.98k stars 291 forks source link

Hoshi's width #65

Closed mr-bat closed 6 years ago

mr-bat commented 6 years ago

I took a look at your code of Hoshi, you're setting components width and height unrelated to the user's custom styling. And also your default width is fed from this.state which leads to undefined because you never defined the width in the state! I partially solved the problem by a hack of not letting Hoshi set it's width itself (commenting two lines).

It's the hell I've been through lately 😅 :

image
mr-bat commented 6 years ago

Also please solve the problem of rtl text for label.

halilb commented 6 years ago

Thank for reporting @mr-bat.

I fixed the problem and you may find the fix in version 0.4.2.

Here is an example:

<Hoshi
  style={[
    styles.input,
    {
      width: 200,
    },
  ]}
  height={60}
  label={'Street'}
  maskColor={'#F9F7F6'}
  borderColor={'#7ac1ba'}
 />