ide / react-native-button

A button for React apps
MIT License
773 stars 129 forks source link

Pass numberOfLines prop to Text node #36

Closed varungupta85 closed 8 years ago

varungupta85 commented 8 years ago

Fairly simple change to pass on the value of numberOfLines prop to the Text node for the button.

ide commented 8 years ago

This affects the numberOfLines props for all Text components in the button and I'm not sure we want that. My recommendation, if you want to customize this prop, is to explicitly create the Text component yourself then:

<Button>
  <Text numberOfLines={2}>Press</Text>
</Button>
varungupta85 commented 8 years ago

@ide Thanks for the response and sorry for responding late. I am kinda new to react native and what you have recommended makes sense.