react-native-ui-lib 7.39.0-snapshot.6491 → 7.39.0-snapshot.6496
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/commons/Constants.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Platform, Dimensions, NativeModules, I18nManager, AccessibilityInfo, StatusBar } from 'react-native';
|
|
1
|
+
import { Platform, Dimensions, NativeModules, I18nManager, AccessibilityInfo, StatusBar, PixelRatio } from 'react-native';
|
|
2
2
|
export let orientations = /*#__PURE__*/function (orientations) {
|
|
3
3
|
orientations["PORTRAIT"] = "portrait";
|
|
4
4
|
orientations["LANDSCAPE"] = "landscape";
|
|
@@ -166,7 +166,9 @@ const constants = {
|
|
|
166
166
|
},
|
|
167
167
|
/* Keyboard */
|
|
168
168
|
backspaceKey: 'Backspace',
|
|
169
|
-
enterKey: 'Enter'
|
|
169
|
+
enterKey: 'Enter',
|
|
170
|
+
/* Font scale */
|
|
171
|
+
getFontScale: PixelRatio.getFontScale
|
|
170
172
|
};
|
|
171
173
|
setStatusBarHeight();
|
|
172
174
|
Dimensions.addEventListener('change', updateConstants);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
|
-
import { StyleSheet, TextInput,
|
|
2
|
+
import { StyleSheet, TextInput, I18nManager } from 'react-native';
|
|
3
3
|
import { Colors, Typography } from "../../style";
|
|
4
4
|
import { BORDER_RADIUS, getHexString, getTextColor } from "./ColorPickerPresenter";
|
|
5
5
|
import View from "../view";
|
|
@@ -19,7 +19,7 @@ const ColorPickerPreview = props => {
|
|
|
19
19
|
const textInput = useRef(null);
|
|
20
20
|
const hex = getHexString(color);
|
|
21
21
|
const textColor = getTextColor(hex);
|
|
22
|
-
const fontScale =
|
|
22
|
+
const fontScale = Constants.getFontScale();
|
|
23
23
|
const value = Colors.isTransparent(text) ? '000000' : text;
|
|
24
24
|
return <View style={[styles.preview, {
|
|
25
25
|
backgroundColor: hex
|