@momo-kits/foundation 0.76.1-beta.2 → 0.77.2-beta.1
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.tsx +8 -5
- package/Application/types.ts +5 -4
- package/Input/Input.tsx +1 -0
- package/Input/styles.ts +13 -3
- package/Layout/Screen.tsx +2 -7
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
|
|
|
4
4
|
import {Icon} from '../Icon';
|
|
5
5
|
import {Text} from '../Text';
|
|
6
6
|
import {ApplicationContext} from './index';
|
|
7
|
+
import {View} from 'react-native';
|
|
7
8
|
|
|
8
9
|
const Tab = createBottomTabNavigator();
|
|
9
10
|
|
|
@@ -21,11 +22,13 @@ const BottomTab: FC<BottomTabProps> = ({tabs, listeners}) => {
|
|
|
21
22
|
options={{
|
|
22
23
|
tabBarLabel: ({color, focused}) => {
|
|
23
24
|
return (
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
<View style={{paddingHorizontal: 16}}>
|
|
26
|
+
<Text
|
|
27
|
+
typography={focused ? 'label_xs' : 'description_xs'}
|
|
28
|
+
color={color}>
|
|
29
|
+
{item.label}
|
|
30
|
+
</Text>
|
|
31
|
+
</View>
|
|
29
32
|
);
|
|
30
33
|
},
|
|
31
34
|
tabBarBadge: item?.badgeLabel,
|
package/Application/types.ts
CHANGED
|
@@ -4,6 +4,8 @@ import Navigator from './Navigator';
|
|
|
4
4
|
import {PopupNotifyProps} from '../Popup/types';
|
|
5
5
|
import Navigation from './Navigation';
|
|
6
6
|
|
|
7
|
+
type Screen = React.ComponentType<NavigationScreenProps>;
|
|
8
|
+
|
|
7
9
|
export type Theme = {
|
|
8
10
|
dark: boolean;
|
|
9
11
|
colors: {
|
|
@@ -65,7 +67,7 @@ export type Context = {
|
|
|
65
67
|
};
|
|
66
68
|
|
|
67
69
|
export type NavigationContainerProps = {
|
|
68
|
-
screen:
|
|
70
|
+
screen: Screen;
|
|
69
71
|
options?: NavigationOptions;
|
|
70
72
|
theme: Theme;
|
|
71
73
|
maxApi?: any;
|
|
@@ -91,13 +93,12 @@ export interface ScreenProps extends ViewProps {
|
|
|
91
93
|
|
|
92
94
|
export type ScreenParams = {
|
|
93
95
|
[key: string]: any;
|
|
94
|
-
screen:
|
|
96
|
+
screen: Screen;
|
|
95
97
|
options?: NavigationOptions;
|
|
96
98
|
};
|
|
97
99
|
|
|
98
100
|
export interface ModalParams extends ScreenParams {
|
|
99
101
|
[key: string]: any;
|
|
100
|
-
screen: React.ElementType;
|
|
101
102
|
onDismiss?: () => void;
|
|
102
103
|
barrierDismissible?: boolean;
|
|
103
104
|
}
|
|
@@ -163,7 +164,7 @@ export type BottomTabItemProps = {
|
|
|
163
164
|
icon: string;
|
|
164
165
|
showDot?: boolean;
|
|
165
166
|
badgeLabel?: string;
|
|
166
|
-
screen: React.ComponentType
|
|
167
|
+
screen: React.ComponentType;
|
|
167
168
|
};
|
|
168
169
|
|
|
169
170
|
export type BottomTabProps = {
|
package/Input/Input.tsx
CHANGED
package/Input/styles.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import {StyleSheet} from 'react-native';
|
|
2
2
|
import {Radius, Spacing} from '../Consts';
|
|
3
|
+
import {scaleSize} from '../Text';
|
|
3
4
|
|
|
4
5
|
export default StyleSheet.create({
|
|
5
6
|
//input style
|
|
6
|
-
input: {
|
|
7
|
+
input: {
|
|
8
|
+
width: '100%',
|
|
9
|
+
paddingLeft: Spacing.M,
|
|
10
|
+
height: '100%',
|
|
11
|
+
fontSize: scaleSize(15),
|
|
12
|
+
},
|
|
7
13
|
wrapper: {
|
|
8
14
|
width: '100%',
|
|
9
15
|
},
|
|
@@ -11,7 +17,6 @@ export default StyleSheet.create({
|
|
|
11
17
|
borderWidth: 1,
|
|
12
18
|
borderRadius: Radius.S,
|
|
13
19
|
height: 56,
|
|
14
|
-
paddingVertical: 8,
|
|
15
20
|
},
|
|
16
21
|
smallContainer: {
|
|
17
22
|
borderRadius: Radius.S,
|
|
@@ -65,6 +70,8 @@ export default StyleSheet.create({
|
|
|
65
70
|
width: '100%',
|
|
66
71
|
flex: 1,
|
|
67
72
|
paddingRight: Spacing.XS,
|
|
73
|
+
paddingVertical: Spacing.XS,
|
|
74
|
+
fontSize: scaleSize(15),
|
|
68
75
|
},
|
|
69
76
|
textAreaWrapper: {
|
|
70
77
|
borderWidth: 1,
|
|
@@ -98,6 +105,8 @@ export default StyleSheet.create({
|
|
|
98
105
|
height: 36,
|
|
99
106
|
marginLeft: Spacing.S,
|
|
100
107
|
flex: 1,
|
|
108
|
+
fontSize: scaleSize(15),
|
|
109
|
+
paddingVertical: Spacing.XS,
|
|
101
110
|
},
|
|
102
111
|
searchInputView: {
|
|
103
112
|
flexDirection: 'row',
|
|
@@ -116,7 +125,8 @@ export default StyleSheet.create({
|
|
|
116
125
|
width: '100%',
|
|
117
126
|
paddingLeft: Spacing.M,
|
|
118
127
|
height: '100%',
|
|
119
|
-
fontSize: 20,
|
|
128
|
+
fontSize: scaleSize(20),
|
|
129
|
+
paddingVertical: Spacing.S,
|
|
120
130
|
fontWeight: 'bold',
|
|
121
131
|
},
|
|
122
132
|
});
|
package/Layout/Screen.tsx
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Animated,
|
|
3
|
-
KeyboardAvoidingView,
|
|
4
|
-
Platform,
|
|
5
|
-
Text,
|
|
6
|
-
View,
|
|
7
|
-
} from 'react-native';
|
|
1
|
+
import {Animated, KeyboardAvoidingView, Platform, View} from 'react-native';
|
|
8
2
|
import {useHeaderHeight} from '@react-navigation/stack';
|
|
9
3
|
import {useSafeAreaInsets} from 'react-native-safe-area-context';
|
|
10
4
|
import React, {useContext, useEffect, useRef} from 'react';
|
|
@@ -166,6 +160,7 @@ const Screen: React.FC<ScreenProps> = ({
|
|
|
166
160
|
})}>
|
|
167
161
|
<Component
|
|
168
162
|
{...scrollViewProps}
|
|
163
|
+
showsVerticalScrollIndicator={false}
|
|
169
164
|
onScroll={handleScroll}
|
|
170
165
|
style={[Styles.flex, {marginTop: marginHeader}]}>
|
|
171
166
|
{renderContent()}
|