@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.
@@ -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, {Fragment, useContext} from '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 <View style={styles.paginationPinkContainer}>{renderDots()}</View>;
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.paginationNumberContainer]}>
14
- <Text color={Colors.black_01} typography={'label_default'}>{`${
15
- activeIndex + 1
16
- }/${dataLength}`}</Text>
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 <View style={[styles.paginationWhiteContainer]}>{renderDots()}</View>;
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;
@@ -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
  });
@@ -20,6 +20,8 @@ export type PaginationProps = {
20
20
  * Represents the total number of items (pages) in the Pagination component.
21
21
  */
22
22
  dataLength: number;
23
+
24
+ style?: ViewStyle | ViewStyle[];
23
25
  };
24
26
 
25
27
  export type DotProps = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.80.1-beta.2",
3
+ "version": "0.80.1-beta.3",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {
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
  );