Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix `lineHeight` problems on native with new `Text` (#3175)

authored by

Hailey and committed by
GitHub
3a6e58ba a289e6bc

+4 -4
+4 -4
src/components/Typography.tsx
··· 3 3 import {UITextView} from 'react-native-ui-text-view' 4 4 5 5 import {useTheme, atoms, web, flatten} from '#/alf' 6 - import {isIOS} from '#/platform/detection' 6 + import {isIOS, isNative} from '#/platform/detection' 7 7 8 8 export type TextProps = RNTextProps & { 9 9 /** ··· 40 40 const fontSize = s.fontSize || atoms.text_md.fontSize 41 41 42 42 if (s?.lineHeight) { 43 - if (s.lineHeight <= 2) { 43 + if (s.lineHeight !== 0 && s.lineHeight <= 2) { 44 44 s.lineHeight = Math.round(fontSize * s.lineHeight) 45 45 } 46 - } else { 47 - s.lineHeight = fontSize 46 + } else if (!isNative) { 47 + s.lineHeight = s.fontSize 48 48 } 49 49 50 50 return s