@momo-kits/foundation 0.159.1-beta.3 → 0.159.1-beta.5
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/Input/Input.tsx
CHANGED
|
@@ -75,7 +75,7 @@ const Input = forwardRef(
|
|
|
75
75
|
const { theme } = useContext(ApplicationContext);
|
|
76
76
|
const context = useContext<any>(MiniAppContext);
|
|
77
77
|
const scaledFontSize = useScaleSize(14);
|
|
78
|
-
const scaleHeight = useScaleSize(size === 'small' ? 48 : 56
|
|
78
|
+
const scaleHeight = useScaleSize(size === 'small' ? 48 : 56);
|
|
79
79
|
const [focused, setFocused] = useState(false);
|
|
80
80
|
const haveValue = !!value || !!defaultValue;
|
|
81
81
|
const inputRef = useRef<TextInput | null>(null);
|
package/Input/InputDropDown.tsx
CHANGED
|
@@ -40,7 +40,7 @@ const InputDropDown = ({
|
|
|
40
40
|
}: InputDropDownProps) => {
|
|
41
41
|
const { theme } = useContext(ApplicationContext);
|
|
42
42
|
const context = useContext<any>(MiniAppContext);
|
|
43
|
-
const scaleHeight = useScaleSize(size === 'small' ? 48 : 56
|
|
43
|
+
const scaleHeight = useScaleSize(size === 'small' ? 48 : 56);
|
|
44
44
|
const componentName = 'InputDropDown';
|
|
45
45
|
|
|
46
46
|
const showBaseLineDebug = context?.features?.showBaseLineDebug ?? false;
|
package/Input/InputMoney.tsx
CHANGED
|
@@ -67,7 +67,7 @@ const InputMoney = forwardRef(
|
|
|
67
67
|
) => {
|
|
68
68
|
const { theme } = useContext(ApplicationContext);
|
|
69
69
|
const context = useContext<any>(MiniAppContext);
|
|
70
|
-
const scaleHeight = useScaleSize(size === 'small' ? 48 : 56
|
|
70
|
+
const scaleHeight = useScaleSize(size === 'small' ? 48 : 56);
|
|
71
71
|
const scaledFontSize = useScaleSize(20);
|
|
72
72
|
const [focused, setFocused] = useState(false);
|
|
73
73
|
const [displayValue, setDisplayValue] = useState('');
|
|
@@ -67,7 +67,7 @@ const InputPhoneNumber = forwardRef(
|
|
|
67
67
|
) => {
|
|
68
68
|
const { theme } = useContext(ApplicationContext);
|
|
69
69
|
const context = useContext<any>(MiniAppContext);
|
|
70
|
-
const scaleHeight = useScaleSize(size === 'small' ? 48 : 56
|
|
70
|
+
const scaleHeight = useScaleSize(size === 'small' ? 48 : 56);
|
|
71
71
|
const [focused, setFocused] = useState(false);
|
|
72
72
|
const haveValue = !!value || !!defaultValue;
|
|
73
73
|
const inputRef = useRef<TextInput | null>(null);
|
package/Popup/PopupPromotion.tsx
CHANGED
package/Text/index.tsx
CHANGED
|
@@ -75,12 +75,6 @@ export interface TextProps extends RNTextProps {
|
|
|
75
75
|
* Ex: MomoSignature, MomoTrustDisplay
|
|
76
76
|
*/
|
|
77
77
|
fontFamily?: string;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Optional. Modified max scale rate of scaleSize function in Text component, default is 1.5.
|
|
81
|
-
* Ex: 1.5, 2
|
|
82
|
-
*/
|
|
83
|
-
maxScaleRate?: number;
|
|
84
78
|
}
|
|
85
79
|
|
|
86
80
|
const deprecatedValues: Typography[] = [
|
|
@@ -98,11 +92,7 @@ const deprecatedValues: Typography[] = [
|
|
|
98
92
|
'action_s',
|
|
99
93
|
];
|
|
100
94
|
|
|
101
|
-
const TypoStyles = (
|
|
102
|
-
typo: Typography,
|
|
103
|
-
newFontFamily?: string,
|
|
104
|
-
maxScaleRate?: number,
|
|
105
|
-
) => {
|
|
95
|
+
const TypoStyles = (typo: Typography, newFontFamily?: string) => {
|
|
106
96
|
const { theme } = useContext(ApplicationContext);
|
|
107
97
|
const styleSheet: {
|
|
108
98
|
[key: string]: any;
|
|
@@ -142,8 +132,8 @@ const TypoStyles = (
|
|
|
142
132
|
return {
|
|
143
133
|
...typoStyle,
|
|
144
134
|
fontFamily,
|
|
145
|
-
fontSize: useScaleSize(fontSize
|
|
146
|
-
lineHeight: useScaleSize(lineHeight
|
|
135
|
+
fontSize: useScaleSize(fontSize),
|
|
136
|
+
lineHeight: useScaleSize(lineHeight),
|
|
147
137
|
fontStyle,
|
|
148
138
|
fontWeight,
|
|
149
139
|
};
|
|
@@ -155,13 +145,12 @@ const Text: React.FC<TextProps> = ({
|
|
|
155
145
|
children,
|
|
156
146
|
style,
|
|
157
147
|
fontFamily,
|
|
158
|
-
maxScaleRate,
|
|
159
148
|
...rest
|
|
160
149
|
}) => {
|
|
161
150
|
const { theme } = useContext(ApplicationContext);
|
|
162
151
|
const context = useContext<any>(MiniAppContext);
|
|
163
152
|
const skeleton = useContext(SkeletonContext);
|
|
164
|
-
const textStyle = TypoStyles(typography, fontFamily
|
|
153
|
+
const textStyle = TypoStyles(typography, fontFamily);
|
|
165
154
|
|
|
166
155
|
if (deprecatedValues.includes(typography)) {
|
|
167
156
|
console.warn(
|