expo / react-native-read-more-text

583 stars 114 forks source link

add option to change text of read more or hiden #16

Closed enieber closed 4 years ago

enieber commented 6 years ago

I need change the text of 'Read More' and 'Hide'

example:

<ReadMore
  readMoreText={'Mais'}
  readHideText={'Menos'}
  numberOfLines={1}
  onReady={this._handleTextReady}>
    <Text style={styles.cardText}>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
              eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
              enim ad minim veniam, quis nostrud exercitation ullamco laboris
              nisi ut aliquip ex ea commodo consequat.  Duis aute irure dolor
              in reprehenderit in voluptate velit esse cillum dolore eu fugiat
              nulla pariatur. Excepteur sint occaecat cupidatat non proident,
              sunt in culpa qui officia deserunt mollit anim id est laborum
    </Text>
</ReadMore>
enieber commented 5 years ago

@brentvatne this PR can be merged?

eriveltonelias commented 4 years ago

Hi, @enieber thanks for your PR! but you can do the same behavior using the renderTruncatedFooter and renderRevealedFooter props to change the label.