@momo-kits/foundation 0.79.1 → 0.79.3

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.
@@ -65,8 +65,8 @@ export type Context = {
65
65
  theme: Theme;
66
66
  navigator?: Navigator;
67
67
  showGrid?: boolean;
68
- language: 'vi' | 'en';
69
- translate: (key: string) => string;
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('.');
@@ -32,7 +32,7 @@ const GridSystem: React.FC<any> = ({
32
32
  };
33
33
  const insets = useSafeAreaInsets();
34
34
 
35
- const list = [];
35
+ const list: number[] = [];
36
36
  for (let i = 1; i <= grid.numberOfColumns; i++) {
37
37
  list.push(i);
38
38
  }
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
@@ -10,7 +10,7 @@ const PaginationWhiteDot: FC<ChildPaginationProps> = ({
10
10
  activeIndex = 0,
11
11
  }) => {
12
12
  const renderDots = () => {
13
- const dots = [];
13
+ const dots: React.ReactElement[] = [];
14
14
  for (let i = 0; i < dataLength; i++) {
15
15
  dots.push(
16
16
  <Dot
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.79.1",
3
+ "version": "0.79.3",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {
@@ -20,7 +20,7 @@
20
20
  "@react-navigation/native": "5.9.8",
21
21
  "@react-navigation/routers": "5.7.4",
22
22
  "lottie-react-native": "3.3.2",
23
- "@react-navigation/stack": "git+https://gitlab.com/dung.huynh1/react-navigation-stack.git#main"
23
+ "@react-navigation/stack": "5.12.8"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react-native": "*"