@momo-kits/foundation 0.92.1-rc.2 → 0.92.1-rc.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/BottomTab/BottomTabBar.tsx +1 -3
- package/Input/InputSearch.tsx +1 -1
- package/Text/styles.ts +1 -1
- package/Text/types.ts +1 -1
- package/Title/index.tsx +7 -18
- package/Title/styles.ts +11 -5
- package/package.json +1 -1
|
@@ -456,7 +456,7 @@ export default function BottomTabBar({
|
|
|
456
456
|
</Animated.View>
|
|
457
457
|
|
|
458
458
|
{renderTabItem(leftArr)}
|
|
459
|
-
{renderCenterComponent()}
|
|
459
|
+
{isFloating && renderCenterComponent()}
|
|
460
460
|
{renderTabItem(rightArr)}
|
|
461
461
|
</View>
|
|
462
462
|
</Animated.View>
|
|
@@ -467,12 +467,10 @@ const styles = StyleSheet.create({
|
|
|
467
467
|
curved: {
|
|
468
468
|
position: 'absolute',
|
|
469
469
|
bottom: 0,
|
|
470
|
-
// backgroundColor: 'red',
|
|
471
470
|
},
|
|
472
471
|
content: {
|
|
473
472
|
flex: 1,
|
|
474
473
|
flexDirection: 'row',
|
|
475
|
-
// backgroundColor: 'red',
|
|
476
474
|
},
|
|
477
475
|
tabBar: {
|
|
478
476
|
left: 0,
|
package/Input/InputSearch.tsx
CHANGED
package/Text/styles.ts
CHANGED
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
header_s_semibold: {fontSize: 14, lineHeight: 20, fontWeight: '600'},
|
|
6
6
|
header_xs_semibold: {fontSize: 12, lineHeight: 18, fontWeight: '600'},
|
|
7
7
|
body_default_regular: {fontSize: 14, lineHeight: 20, fontWeight: '400'},
|
|
8
|
-
|
|
8
|
+
body_default_regularstrikethrought: {
|
|
9
9
|
fontSize: 14,
|
|
10
10
|
lineHeight: 20,
|
|
11
11
|
fontWeight: '400',
|
package/Text/types.ts
CHANGED
|
@@ -20,7 +20,7 @@ export type Typography =
|
|
|
20
20
|
| 'header_s_semibold'
|
|
21
21
|
| 'header_xs_semibold'
|
|
22
22
|
| 'body_default_regular'
|
|
23
|
-
| '
|
|
23
|
+
| 'body_default_regularstrikethrought'
|
|
24
24
|
| 'description_default_regular'
|
|
25
25
|
| 'description_default_regularstrikethrought'
|
|
26
26
|
| 'description_xs_regular'
|
package/Title/index.tsx
CHANGED
|
@@ -4,7 +4,6 @@ import styles from './styles';
|
|
|
4
4
|
import {Icon} from '../Icon';
|
|
5
5
|
import {scaleSize, Text} from '../Text';
|
|
6
6
|
import {ApplicationContext} from '../Application';
|
|
7
|
-
import {Colors, Spacing} from '../Consts';
|
|
8
7
|
import {Badge} from '../Badge';
|
|
9
8
|
import {Typography} from '../Text/types';
|
|
10
9
|
import {TitleProps} from './types';
|
|
@@ -25,6 +24,7 @@ const Title: FC<TitleProps> = ({
|
|
|
25
24
|
buttonSize = 'small',
|
|
26
25
|
}) => {
|
|
27
26
|
const {theme} = useContext(ApplicationContext);
|
|
27
|
+
|
|
28
28
|
const styleSheet: {
|
|
29
29
|
[key: string]: any;
|
|
30
30
|
} = styles;
|
|
@@ -33,10 +33,6 @@ const Title: FC<TitleProps> = ({
|
|
|
33
33
|
const numberOfLines = showLeftAction || !!badgeLabel ? 1 : 2;
|
|
34
34
|
const buttonTypo: Typography =
|
|
35
35
|
buttonSize === 'small' ? 'action_xs_bold' : 'action_s_bold';
|
|
36
|
-
const widthStyle =
|
|
37
|
-
!showLeftAction && !showRightAction && !badgeLabel
|
|
38
|
-
? {width: '100%'}
|
|
39
|
-
: {width: '75%'};
|
|
40
36
|
|
|
41
37
|
const renderIcon = () => {
|
|
42
38
|
if (!icon) return null;
|
|
@@ -62,23 +58,16 @@ const Title: FC<TitleProps> = ({
|
|
|
62
58
|
|
|
63
59
|
const renderContent = () => {
|
|
64
60
|
return (
|
|
65
|
-
<View style={
|
|
66
|
-
<View style={[styles.iconLeftView
|
|
61
|
+
<View style={styles.contentView}>
|
|
62
|
+
<View style={[styles.iconLeftView]}>
|
|
67
63
|
<RNText
|
|
68
64
|
numberOfLines={numberOfLines}
|
|
69
|
-
style={[
|
|
70
|
-
styleSheet[typography],
|
|
71
|
-
{
|
|
72
|
-
fontWeight: 'bold',
|
|
73
|
-
marginBottom: Spacing.XS,
|
|
74
|
-
},
|
|
75
|
-
]}>
|
|
65
|
+
style={[styleSheet[typography], styles.title]}>
|
|
76
66
|
{title}
|
|
77
67
|
</RNText>
|
|
68
|
+
|
|
78
69
|
<View style={{alignItems: 'center'}}>
|
|
79
|
-
{badgeLabel &&
|
|
80
|
-
<Badge style={{marginLeft: Spacing.XS}} label={badgeLabel} />
|
|
81
|
-
)}
|
|
70
|
+
{badgeLabel && <Badge style={styles.badge} label={badgeLabel} />}
|
|
82
71
|
</View>
|
|
83
72
|
{renderActionLeft()}
|
|
84
73
|
</View>
|
|
@@ -95,7 +84,7 @@ const Title: FC<TitleProps> = ({
|
|
|
95
84
|
return (
|
|
96
85
|
<View style={styles.iconLeftView}>
|
|
97
86
|
{showLeftAction && !showRightAction && (
|
|
98
|
-
<View style={
|
|
87
|
+
<View style={styles.iconLeft}>
|
|
99
88
|
<Icon
|
|
100
89
|
source={'arrow_chevron_right_small'}
|
|
101
90
|
size={scaleSize(18)}
|
package/Title/styles.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {StyleSheet} from 'react-native';
|
|
2
2
|
import {scaleSize} from '../Text';
|
|
3
|
-
import {Radius, Spacing} from '../Consts';
|
|
3
|
+
import {Colors, Radius, Spacing} from '../Consts';
|
|
4
4
|
|
|
5
5
|
export default StyleSheet.create({
|
|
6
6
|
card_small: {
|
|
@@ -39,10 +39,6 @@ export default StyleSheet.create({
|
|
|
39
39
|
wrapper: {
|
|
40
40
|
flexDirection: 'row',
|
|
41
41
|
},
|
|
42
|
-
textContent: {
|
|
43
|
-
marginRight: Spacing.S,
|
|
44
|
-
flex: 1,
|
|
45
|
-
},
|
|
46
42
|
margin: {
|
|
47
43
|
marginTop: Spacing.S,
|
|
48
44
|
},
|
|
@@ -64,9 +60,19 @@ export default StyleSheet.create({
|
|
|
64
60
|
alignItems: 'center',
|
|
65
61
|
justifyContent: 'center',
|
|
66
62
|
marginHorizontal: Spacing.XS,
|
|
63
|
+
backgroundColor: Colors.black_06,
|
|
67
64
|
},
|
|
68
65
|
iconLeftView: {
|
|
69
66
|
flexDirection: 'row',
|
|
70
67
|
alignItems: 'center',
|
|
71
68
|
},
|
|
69
|
+
contentView: {marginRight: Spacing.S, flex: 1},
|
|
70
|
+
title: {
|
|
71
|
+
fontWeight: 'bold',
|
|
72
|
+
marginBottom: Spacing.XS,
|
|
73
|
+
flex: 1,
|
|
74
|
+
},
|
|
75
|
+
badge: {
|
|
76
|
+
marginLeft: Spacing.XS,
|
|
77
|
+
},
|
|
72
78
|
});
|