@momo-kits/foundation 0.115.2-beta.10 → 0.115.2-beta.11

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.
@@ -50,7 +50,6 @@ const HeaderRight: React.FC<any> = props => {
50
50
  const HeaderToolkitAction: React.FC<any> = ({
51
51
  tintColor,
52
52
  preventClose,
53
- useSystemTools = true,
54
53
  useShortcut = false,
55
54
  useMore = false,
56
55
  tools = [],
@@ -199,7 +198,6 @@ const HeaderToolkitAction: React.FC<any> = ({
199
198
  navigator?.maxApi?.dispatchFunction?.(
200
199
  'showTools',
201
200
  {
202
- useSystemTools,
203
201
  tools,
204
202
  context,
205
203
  },
@@ -98,7 +98,6 @@ export type Tool = {
98
98
  name: {vi: string; en: string};
99
99
  key: string;
100
100
  showBadge?: boolean;
101
- showRightIcon?: boolean;
102
101
  onPress: () => void;
103
102
  };
104
103
 
@@ -0,0 +1,45 @@
1
+ import React, {useContext} from 'react';
2
+ import {View, ViewStyle} from 'react-native';
3
+ import {ApplicationContext} from '../Application';
4
+ import {Spacing} from '../Consts';
5
+ import Svg, {Line} from 'react-native-svg';
6
+
7
+ export interface DashDividerProps {
8
+ /**
9
+ * Custom styles for dash divider
10
+ */
11
+ style?: ViewStyle;
12
+ }
13
+
14
+ const DashDivider: React.FC<DashDividerProps> = ({style}) => {
15
+ const {theme} = useContext(ApplicationContext);
16
+ const borderColor = theme.colors.border.default;
17
+
18
+ return (
19
+ <View
20
+ style={[
21
+ {
22
+ width: '100%',
23
+ height: 1,
24
+ marginVertical: Spacing.XS,
25
+ },
26
+ style,
27
+ ]}>
28
+ <Svg height="1" width="100%">
29
+ <Line
30
+ x1="0"
31
+ y1="0"
32
+ x2="100%"
33
+ y2="0"
34
+ stroke={borderColor}
35
+ strokeWidth="1"
36
+ strokeDasharray={`4, 4`}
37
+ strokeLinecap={'round'}
38
+ strokeLinejoin={'miter'}
39
+ />
40
+ </Svg>
41
+ </View>
42
+ );
43
+ };
44
+
45
+ export {DashDivider};
package/Divider/index.tsx CHANGED
@@ -1,21 +1,37 @@
1
1
  import React, {useContext} from 'react';
2
- import {View} from 'react-native';
2
+ import {View, ViewStyle} from 'react-native';
3
3
  import {ApplicationContext} from '../Application';
4
4
  import {Spacing} from '../Consts';
5
+ import {DashDivider} from './DashDivider';
5
6
 
6
- const Divider = () => {
7
+ export interface DividerProps {
8
+ /**
9
+ * Custom styles for divider
10
+ */
11
+ style?: ViewStyle;
12
+
13
+ /**
14
+ * Enable margin vertical 4px
15
+ */
16
+ useMargin?: boolean;
17
+ }
18
+
19
+ const Divider: React.FC<DividerProps> = ({style, useMargin = true}) => {
7
20
  const {theme} = useContext(ApplicationContext);
8
21
 
9
22
  return (
10
23
  <View
11
- style={{
12
- height: 1,
13
- width: '100%',
14
- backgroundColor: theme.colors.border.default,
15
- marginVertical: Spacing.XS,
16
- }}
24
+ style={[
25
+ style,
26
+ {
27
+ height: 1,
28
+ width: '100%',
29
+ backgroundColor: theme.colors.border.default,
30
+ marginVertical: useMargin ? Spacing.XS : 0,
31
+ },
32
+ ]}
17
33
  />
18
34
  );
19
35
  };
20
36
 
21
- export {Divider};
37
+ export {Divider, DashDivider};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.115.2-beta.10",
3
+ "version": "0.115.2-beta.11",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},