@momo-kits/foundation 0.80.3 → 0.80.4
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 +0 -7
- package/Input/Input.tsx +1 -1
- package/Layout/Card.tsx +4 -1
- package/Title/index.tsx +9 -9
- package/package.json +1 -1
package/Application/utils.tsx
CHANGED
|
@@ -139,13 +139,6 @@ 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
|
-
|
|
149
142
|
if (params.hiddenBack) {
|
|
150
143
|
options = {
|
|
151
144
|
...options,
|
package/Input/Input.tsx
CHANGED
package/Layout/Card.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {useContext} from 'react';
|
|
1
|
+
import React, {Fragment, 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,6 +120,9 @@ 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
|
+
}
|
|
123
126
|
}
|
|
124
127
|
return element;
|
|
125
128
|
};
|
package/Title/index.tsx
CHANGED
|
@@ -26,20 +26,20 @@ const Title: FC<TitleProps> = ({
|
|
|
26
26
|
const actionColor = titleFlex
|
|
27
27
|
? theme.colors.primary
|
|
28
28
|
: theme.colors.text.default;
|
|
29
|
-
const actionBackground = titleFlex
|
|
29
|
+
const actionBackground = titleFlex
|
|
30
|
+
? theme.colors.primary + '0F'
|
|
31
|
+
: Colors.black_06;
|
|
30
32
|
const actionSize = titleFlex ? scaleSize(22) : scaleSize(18);
|
|
31
33
|
const titleWeight = type === 'screen' ? 'Semibold' : 'Bold';
|
|
32
34
|
const marginStyle = type === 'section' ? {marginTop: Spacing.M} : {};
|
|
33
35
|
|
|
34
36
|
const renderAction = () => {
|
|
35
37
|
return !!actionTitle && titleFlex ? (
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
title={actionTitle}
|
|
42
|
-
/>
|
|
38
|
+
<TouchableOpacity onPress={onPressAction}>
|
|
39
|
+
<Text typography={'action_s'} color={theme.colors.primary}>
|
|
40
|
+
{actionTitle}
|
|
41
|
+
</Text>
|
|
42
|
+
</TouchableOpacity>
|
|
43
43
|
) : (
|
|
44
44
|
<TouchableOpacity
|
|
45
45
|
style={[
|
|
@@ -76,7 +76,7 @@ const Title: FC<TitleProps> = ({
|
|
|
76
76
|
</RNText>
|
|
77
77
|
{showAction && type !== 'screen' && renderAction()}
|
|
78
78
|
</View>
|
|
79
|
-
{!!description &&
|
|
79
|
+
{!!description && type !== 'screen' && (
|
|
80
80
|
<Text typography={'description_s'} color={theme.colors.text.secondary}>
|
|
81
81
|
{description}
|
|
82
82
|
</Text>
|