FaridSafi / react-native-gifted-form

📝 « One React-Native form component to rule them all »
MIT License
1.44k stars 214 forks source link

custom text TextInputWidget #10

Open cmdillon opened 8 years ago

cmdillon commented 8 years ago

hi! i was wondering if it's possible to custom style the text input fields. if so, how?

FaridSafi commented 8 years ago

Hello, you can use widgetStyles prop in the TextInputWidget component

widgetStyles={{
  textInput: {
    // your style
  }
}}

or you can set a global style using formStyles prop in the GiftedForm component

formStyles={{
  TextInputWidget: {
    textInput: {
      // your style
    }
  }
}}
cmdillon commented 8 years ago

thanx, for the info. i initially tried that , but it seems not to work for me. i tried changing the background color and height, but nothing happened. my react-native version: 0.19.0

any ideas?

FaridSafi commented 8 years ago

please try

widgetStyles={{
  textInputInline: {
    // your style
  }
}}
cmdillon commented 8 years ago

sweet! that was it—thanx!