diff options
author | Paul Frazee <pfrazee@gmail.com> | 2024-03-19 14:05:43 -0700 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2024-03-19 14:05:43 -0700 |
commit | a2ed2c3b22c38a0a6cc1b4b83ba6be6dc3e5dac1 (patch) | |
tree | d85c6e8b24d049517ac616b7f7571565d2432f0f /src/view/com/util/text/Text.tsx | |
parent | ccf53af2ba1120e423679f5c0803349de4331443 (diff) | |
parent | 54dd4af312594596396c76baf17e0e0a3d89d5bd (diff) | |
download | voidsky-a2ed2c3b22c38a0a6cc1b4b83ba6be6dc3e5dac1.tar.zst |
Merge branch 'web-fix-fonts-and-image-box' of https://github.com/alexkuz/social-app into alexkuz-web-fix-fonts-and-image-box
Diffstat (limited to 'src/view/com/util/text/Text.tsx')
-rw-r--r-- | src/view/com/util/text/Text.tsx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/view/com/util/text/Text.tsx b/src/view/com/util/text/Text.tsx index ccb51bfca..37d665581 100644 --- a/src/view/com/util/text/Text.tsx +++ b/src/view/com/util/text/Text.tsx @@ -2,7 +2,7 @@ import React from 'react' import {Text as RNText, TextProps} from 'react-native' import {s, lh} from 'lib/styles' import {useTheme, TypographyVariant} from 'lib/ThemeContext' -import {isIOS} from 'platform/detection' +import {isIOS, isWeb} from 'platform/detection' import {UITextView} from 'react-native-ui-text-view' export type CustomTextProps = TextProps & { @@ -13,6 +13,11 @@ export type CustomTextProps = TextProps & { selectable?: boolean } +const fontFamilyStyle = { + fontFamily: + '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Liberation Sans", Helvetica, Arial, sans-serif', +} + export function Text({ type = 'md', children, @@ -39,7 +44,13 @@ export function Text({ return ( <RNText - style={[s.black, typography, lineHeightStyle, style]} + style={[ + s.black, + typography, + isWeb && fontFamilyStyle, + lineHeightStyle, + style, + ]} // @ts-ignore web only -esb dataSet={Object.assign({tooltip: title}, dataSet || {})} selectable={selectable} |