@momo-kits/foundation 0.79.1-beta.1 → 0.79.2
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/Application/types.ts
CHANGED
|
@@ -65,8 +65,8 @@ export type Context = {
|
|
|
65
65
|
theme: Theme;
|
|
66
66
|
navigator?: Navigator;
|
|
67
67
|
showGrid?: boolean;
|
|
68
|
-
language
|
|
69
|
-
translate
|
|
68
|
+
language?: 'vi' | 'en';
|
|
69
|
+
translate?: (key: string) => string;
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
export type LocalizationObject = {
|
package/Input/utils.ts
CHANGED
|
@@ -3,7 +3,7 @@ const formatNumberToMoney = (number: number, currency = '') => {
|
|
|
3
3
|
return `0${currency}`;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
const array = [];
|
|
6
|
+
const array: string[] = [];
|
|
7
7
|
let result = '';
|
|
8
8
|
let isNegative = false;
|
|
9
9
|
|
|
@@ -23,7 +23,7 @@ const formatNumberToMoney = (number: number, currency = '') => {
|
|
|
23
23
|
array.push(',');
|
|
24
24
|
count = 0;
|
|
25
25
|
} else {
|
|
26
|
-
array.push(numberString[i]);
|
|
26
|
+
array.push(numberString[i] as string);
|
|
27
27
|
}
|
|
28
28
|
if (count === 3 && i >= 1) {
|
|
29
29
|
array.push('.');
|
package/Layout/GridSystem.tsx
CHANGED
package/Layout/utils.ts
CHANGED
|
@@ -36,7 +36,7 @@ const validateChildren = (
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
if (Array.isArray(children)) {
|
|
39
|
-
const flattenChildren = children.flat();
|
|
39
|
+
const flattenChildren: React.ReactElement[] = children.flat();
|
|
40
40
|
results = flattenChildren.filter((child: React.ReactElement) => {
|
|
41
41
|
if (validateType(child)) {
|
|
42
42
|
return child;
|
|
@@ -12,7 +12,7 @@ const PaginationDot: FC<ChildPaginationProps> = ({
|
|
|
12
12
|
}) => {
|
|
13
13
|
const {theme} = useContext(ApplicationContext);
|
|
14
14
|
const renderDots = () => {
|
|
15
|
-
const dots = [];
|
|
15
|
+
const dots: React.ReactElement[] = [];
|
|
16
16
|
for (let i = 0; i < dataLength; i++) {
|
|
17
17
|
dots.push(
|
|
18
18
|
<Dot
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@momo-kits/foundation",
|
|
3
|
-
"version": "0.79.
|
|
3
|
+
"version": "0.79.2",
|
|
4
4
|
"description": "React Native Component Kits",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -42,4 +42,4 @@
|
|
|
42
42
|
},
|
|
43
43
|
"author": "@momo-kits/foundation",
|
|
44
44
|
"license": "ISC"
|
|
45
|
-
}
|
|
45
|
+
}
|