@momo-kits/foundation 0.80.1-beta.2 → 0.80.1-beta.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.
- package/Application/utils.tsx +7 -0
- package/Layout/Card.tsx +1 -4
- package/Pagination/PaginationDot.tsx +6 -1
- package/Pagination/PaginationNumber.tsx +7 -4
- package/Pagination/PaginationWhiteDot.tsx +6 -1
- package/Pagination/styles.ts +4 -0
- package/Pagination/types.ts +2 -0
- package/package.json +1 -1
- package/verify.js +0 -3
package/Application/utils.tsx
CHANGED
|
@@ -139,6 +139,13 @@ const getOptions = (params: NavigationOptions, theme: Theme) => {
|
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
if (params?.headerRight == undefined) {
|
|
143
|
+
options = {
|
|
144
|
+
...options,
|
|
145
|
+
headerRight: (props: any) => <HeaderToolkitAction {...props} />,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
142
149
|
if (params.hiddenBack) {
|
|
143
150
|
options = {
|
|
144
151
|
...options,
|
package/Layout/Card.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {useContext} from 'react';
|
|
2
2
|
import {Dimensions, View, ViewProps} from 'react-native';
|
|
3
3
|
import {useGridSystem, validateChildren} from './utils';
|
|
4
4
|
import {GridContextProps} from './types';
|
|
@@ -120,9 +120,6 @@ const Card: React.FC<CardProps> = ({children, style, backgroundImage}) => {
|
|
|
120
120
|
}
|
|
121
121
|
} else {
|
|
122
122
|
element.push(children);
|
|
123
|
-
if (children?.type == Fragment) {
|
|
124
|
-
return renderView(children?.props.children);
|
|
125
|
-
}
|
|
126
123
|
}
|
|
127
124
|
return element;
|
|
128
125
|
};
|
|
@@ -9,6 +9,7 @@ import {ApplicationContext} from '../Application';
|
|
|
9
9
|
const PaginationDot: FC<ChildPaginationProps> = ({
|
|
10
10
|
dataLength = 2,
|
|
11
11
|
activeIndex = 0,
|
|
12
|
+
style,
|
|
12
13
|
}) => {
|
|
13
14
|
const {theme} = useContext(ApplicationContext);
|
|
14
15
|
const renderDots = () => {
|
|
@@ -27,7 +28,11 @@ const PaginationDot: FC<ChildPaginationProps> = ({
|
|
|
27
28
|
}
|
|
28
29
|
return dots;
|
|
29
30
|
};
|
|
30
|
-
return
|
|
31
|
+
return (
|
|
32
|
+
<View style={[style, styles.row]}>
|
|
33
|
+
<View style={styles.paginationPinkContainer}>{renderDots()}</View>
|
|
34
|
+
</View>
|
|
35
|
+
);
|
|
31
36
|
};
|
|
32
37
|
|
|
33
38
|
export default PaginationDot;
|
|
@@ -8,12 +8,15 @@ import {Colors} from '../Consts';
|
|
|
8
8
|
const PaginationNumber: FC<ChildPaginationProps> = ({
|
|
9
9
|
activeIndex = 0,
|
|
10
10
|
dataLength = 2,
|
|
11
|
+
style,
|
|
11
12
|
}) => {
|
|
12
13
|
return (
|
|
13
|
-
<View style={[styles.
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
<View style={[style, styles.row]}>
|
|
15
|
+
<View style={styles.paginationNumberContainer}>
|
|
16
|
+
<Text color={Colors.black_01} typography={'label_default'}>{`${
|
|
17
|
+
activeIndex + 1
|
|
18
|
+
}/${dataLength}`}</Text>
|
|
19
|
+
</View>
|
|
17
20
|
</View>
|
|
18
21
|
);
|
|
19
22
|
};
|
|
@@ -8,6 +8,7 @@ import {Colors, Spacing} from '../Consts';
|
|
|
8
8
|
const PaginationWhiteDot: FC<ChildPaginationProps> = ({
|
|
9
9
|
dataLength = 2,
|
|
10
10
|
activeIndex = 0,
|
|
11
|
+
style,
|
|
11
12
|
}) => {
|
|
12
13
|
const renderDots = () => {
|
|
13
14
|
const dots: React.ReactElement[] = [];
|
|
@@ -24,7 +25,11 @@ const PaginationWhiteDot: FC<ChildPaginationProps> = ({
|
|
|
24
25
|
}
|
|
25
26
|
return dots;
|
|
26
27
|
};
|
|
27
|
-
return
|
|
28
|
+
return (
|
|
29
|
+
<View style={[style, styles.row]}>
|
|
30
|
+
<View style={styles.paginationWhiteContainer}>{renderDots()}</View>
|
|
31
|
+
</View>
|
|
32
|
+
);
|
|
28
33
|
};
|
|
29
34
|
|
|
30
35
|
export default PaginationWhiteDot;
|
package/Pagination/styles.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {StyleSheet} from 'react-native';
|
|
2
2
|
import {Colors, Radius, Spacing} from '../Consts';
|
|
3
|
+
import {scaleSize} from '../Text';
|
|
3
4
|
|
|
4
5
|
export default StyleSheet.create({
|
|
5
6
|
activeDot: {
|
|
@@ -25,6 +26,8 @@ export default StyleSheet.create({
|
|
|
25
26
|
paddingHorizontal: Spacing.S,
|
|
26
27
|
borderRadius: Radius.L,
|
|
27
28
|
backgroundColor: Colors.black_20 + '33',
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
justifyContent: 'center',
|
|
28
31
|
},
|
|
29
32
|
scrollContainer: {
|
|
30
33
|
alignItems: 'center',
|
|
@@ -44,4 +47,5 @@ export default StyleSheet.create({
|
|
|
44
47
|
height: 4,
|
|
45
48
|
borderRadius: Radius.XS,
|
|
46
49
|
},
|
|
50
|
+
row: {flexDirection: 'row'},
|
|
47
51
|
});
|
package/Pagination/types.ts
CHANGED
package/package.json
CHANGED
package/verify.js
CHANGED
|
@@ -16,9 +16,6 @@ try {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
if (packageVersion > iOSAppTarget || packageVersion > androidAppTarget) {
|
|
19
|
-
console.error(
|
|
20
|
-
`Package ${packageInfo.name} version: ${packageInfo.version} require deploymentTarget ${packageVersion}`,
|
|
21
|
-
);
|
|
22
19
|
throw new Error(
|
|
23
20
|
`Package ${packageInfo.name} version: ${packageInfo.version} require deploymentTarget ${packageVersion}`,
|
|
24
21
|
);
|