@momo-kits/foundation 0.81.8-beta.2 → 0.81.9
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/StackScreen.tsx +3 -1
- package/Input/Input.tsx +3 -1
- package/Input/index.tsx +2 -0
- package/Layout/Screen.tsx +0 -1
- package/package.json +1 -1
|
@@ -3,11 +3,13 @@ import {ScreenParams} from './types';
|
|
|
3
3
|
import Navigation from './Navigation';
|
|
4
4
|
import {ApplicationContext} from './index';
|
|
5
5
|
import {GridSystem} from '../Layout';
|
|
6
|
+
import {useHeaderHeight} from '@react-navigation/stack';
|
|
6
7
|
|
|
7
8
|
const StackScreen: React.FC<ScreenParams> = props => {
|
|
8
9
|
const {screen: Component, options}: ScreenParams = props.route.params;
|
|
9
10
|
const {theme, showGrid, navigator} = useContext(ApplicationContext);
|
|
10
11
|
const navigation = new Navigation(props.navigation, theme);
|
|
12
|
+
const heightHeader = useHeaderHeight();
|
|
11
13
|
|
|
12
14
|
const params = {
|
|
13
15
|
...props.route.params,
|
|
@@ -50,7 +52,7 @@ const StackScreen: React.FC<ScreenParams> = props => {
|
|
|
50
52
|
|
|
51
53
|
return (
|
|
52
54
|
<>
|
|
53
|
-
<Component {...params} />
|
|
55
|
+
<Component heightHeader={heightHeader} {...params} />
|
|
54
56
|
{showGrid && <GridSystem />}
|
|
55
57
|
</>
|
|
56
58
|
);
|
package/Input/Input.tsx
CHANGED
|
@@ -35,6 +35,7 @@ const Input = forwardRef(
|
|
|
35
35
|
loading,
|
|
36
36
|
leadingIcon,
|
|
37
37
|
leadingIconColor,
|
|
38
|
+
fontWeight = 'normal',
|
|
38
39
|
style,
|
|
39
40
|
...props
|
|
40
41
|
}: InputProps,
|
|
@@ -80,6 +81,7 @@ const Input = forwardRef(
|
|
|
80
81
|
let textColor = theme.colors.text.default;
|
|
81
82
|
let placeholderColor = theme.colors.text.hint;
|
|
82
83
|
let iconTintColor = iconColor;
|
|
84
|
+
const inputTextWeight = fontWeight === 'bold' ? 'Bold' : 'Regular';
|
|
83
85
|
|
|
84
86
|
if (disabled) {
|
|
85
87
|
textColor = disabledColor;
|
|
@@ -122,7 +124,7 @@ const Input = forwardRef(
|
|
|
122
124
|
styles.input,
|
|
123
125
|
{
|
|
124
126
|
color: textColor,
|
|
125
|
-
fontFamily: `${theme.font}
|
|
127
|
+
fontFamily: `${theme.font}-${inputTextWeight}`,
|
|
126
128
|
},
|
|
127
129
|
]}
|
|
128
130
|
textBreakStrategy="highQuality"
|
package/Input/index.tsx
CHANGED
package/Layout/Screen.tsx
CHANGED