fawaz-ahmed / react-native-read-more

React native library to show text in a condensed way and expand when needed. Drop in replacement for Text component and highly customizable. Can be used with expo or native cli for react native.
https://www.npmjs.com/package/@fawazahmed/react-native-read-more
MIT License
274 stars 37 forks source link

Border line attributes Not applicable on seeLessStyle. #67

Closed amang-dew closed 2 years ago

amang-dew commented 2 years ago

seeLessStyle: { fontFamily: FONT_FAMILY.OpenSansRegular, fontSize: normalize(14), color:colors.inactiveTabColor, borderBottomWidth:1, borderColor:colors.activeButtonColor }

<ReadMore style={styles.caption} seeMoreText={'See More'} seeMoreStyle={styles.seeMoreStyle} seeLessText={'See Less'} seeLessStyle={styles.seeLessStyle} numberOfLines={3}

{item.postData}

Border is not visible on See Less Text. @fawaz-ahmed

fawaz-ahmed commented 2 years ago

@amang-dew border will not appear in see less since it's a nested text component. You can use the underline css:

seeLessStyle: {
  fontFamily: FONT_FAMILY.OpenSansRegular,
  fontSize: normalize(14),
  color:colors.inactiveTabColor,
  textDecorationLine: 'underline'
}
amang-dew commented 2 years ago

Thanks @fawaz-ahmed. It works for me.