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

line spacing in a paragraph #72

Closed darias08 closed 1 year ago

darias08 commented 1 year ago

Hi I am trying to create the amount of spacing in a paragraph between top line and below line.

Ex: ffffffff <--- The amount of space I can place. ffffffff

I have tried numberOfLines which just makes how many lines you want in your paragraph and not necessarily the amount of spacing in-between the paragraphs.

fawaz-ahmed commented 1 year ago

Hi @darias08 , this is a styling issue, you need to adjust the style property lineHeight ref: https://reactnative.dev/docs/text-style-props#lineheight

The ReadMore component is using Text component and any Text prop you pass down will reflect similar to a Text component.