Add 'Liberation Sans' font for FireFox on Linux; lightbox buttons adjustments
This commit is contained in:
parent
98bca69ae9
commit
0e3b2633b9
6 changed files with 94 additions and 34 deletions
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue