Add min height to post text

zio/stable
Paul Frazee 2022-11-18 10:58:48 -06:00
parent ff68e5b85a
commit 69609d8732
4 changed files with 16 additions and 4 deletions

View File

@ -294,7 +294,7 @@ export const PostThreadItem = observer(function PostThreadItem({
<RichText
text={record.text}
entities={record.entities}
style={[styles.postText, s.f17, s['lh17-1.3']]}
style={[styles.postText]}
/>
</View>
<PostCtrls
@ -361,6 +361,9 @@ const styles = StyleSheet.create({
},
postText: {
fontFamily: 'Helvetica Neue',
fontSize: 17,
lineHeight: 22.1, // 1.3 of 17px
minHeight: 28,
},
postTextContainer: {
flexDirection: 'row',

View File

@ -147,7 +147,7 @@ export const Post = observer(function Post({uri}: {uri: string}) {
<RichText
text={record.text}
entities={record.entities}
style={[s.f16, s['lh16-1.3']]}
style={styles.postText}
/>
</View>
<PostCtrls
@ -191,4 +191,10 @@ const styles = StyleSheet.create({
flexWrap: 'wrap',
paddingBottom: 8,
},
postText: {
fontFamily: 'Helvetica Neue',
fontSize: 17,
lineHeight: 22.1, // 1.3 of 17px
minHeight: 28,
},
})

View File

@ -143,7 +143,7 @@ export const FeedItem = observer(function FeedItem({
<RichText
text={record.text}
entities={record.entities}
style={[s.f17, s['lh17-1.3']]}
style={styles.postText}
/>
</View>
<PostCtrls
@ -199,5 +199,8 @@ const styles = StyleSheet.create({
},
postText: {
fontFamily: 'Helvetica Neue',
fontSize: 17,
lineHeight: 22.1, // 1.3 of 17px
minHeight: 28,
},
})

View File

@ -85,7 +85,7 @@ export const s = StyleSheet.create({
['lh16-1']: {lineHeight: 16},
['lh16-1.3']: {lineHeight: 20.8}, // 1.3 of 16px
['lh17-1']: {lineHeight: 17},
['lh17-1.3']: {lineHeight: 22.1}, // 1.3 of 16px
['lh17-1.3']: {lineHeight: 22.1}, // 1.3 of 17px
['lh18-1']: {lineHeight: 18},
['lh18-1.3']: {lineHeight: 23.4}, // 1.3 of 18px