@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.
@@ -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,
@@ -34,9 +34,9 @@ const InputSearch = forwardRef(
34
34
  style,
35
35
  defaultValue,
36
36
  onPressButtonText,
37
- hasColorBG = true,
38
37
  params,
39
38
  componentId,
39
+ hasColorBG = false,
40
40
  ...props
41
41
  }: InputSearchProps,
42
42
  ref,
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
- body_regularstrikethrought: {
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
- | 'body_regularstrikethrought'
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={{flex: 1}}>
66
- <View style={[styles.iconLeftView, widthStyle]}>
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={[styles.iconLeft, {backgroundColor: Colors.black_06}]}>
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
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.92.1-rc.2",
3
+ "version": "0.92.1-rc.4",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {