secullum-react-native-ui 4.6.6 → 4.6.7
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.
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
interface Props {
|
|
3
|
+
extraHeight: number;
|
|
4
|
+
}
|
|
5
|
+
export declare class StatusBar extends React.Component<Props> {
|
|
3
6
|
static height: number;
|
|
4
7
|
getStyles: () => {
|
|
5
8
|
statusBar: {
|
|
@@ -7,5 +10,9 @@ export declare class StatusBar extends React.Component {
|
|
|
7
10
|
height: number;
|
|
8
11
|
};
|
|
9
12
|
};
|
|
13
|
+
static defaultProps: {
|
|
14
|
+
extraHeight: number;
|
|
15
|
+
};
|
|
10
16
|
render(): JSX.Element;
|
|
11
17
|
}
|
|
18
|
+
export {};
|
|
@@ -10,10 +10,11 @@ class StatusBar extends React.Component {
|
|
|
10
10
|
super(...arguments);
|
|
11
11
|
this.getStyles = () => {
|
|
12
12
|
const theme = (0, theme_1.getTheme)();
|
|
13
|
+
const { extraHeight } = this.props;
|
|
13
14
|
const styles = react_native_1.StyleSheet.create({
|
|
14
15
|
statusBar: {
|
|
15
16
|
backgroundColor: theme.statusBarColor,
|
|
16
|
-
height: (0, react_native_status_bar_height_1.getStatusBarHeight)()
|
|
17
|
+
height: (0, react_native_status_bar_height_1.getStatusBarHeight)() + extraHeight
|
|
17
18
|
}
|
|
18
19
|
});
|
|
19
20
|
return styles;
|
|
@@ -27,3 +28,6 @@ class StatusBar extends React.Component {
|
|
|
27
28
|
}
|
|
28
29
|
exports.StatusBar = StatusBar;
|
|
29
30
|
StatusBar.height = (0, react_native_status_bar_height_1.getStatusBarHeight)();
|
|
31
|
+
StatusBar.defaultProps = {
|
|
32
|
+
extraHeight: 0
|
|
33
|
+
};
|
|
@@ -86,15 +86,17 @@ class TextBox extends React.Component {
|
|
|
86
86
|
this.props.onKeyPress(react_native_1.Platform.OS === 'web' ? event : event.nativeEvent);
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
89
|
+
return (React.createElement(react_native_1.TouchableWithoutFeedback, { accessible: false, onPress: () => (onPress ? onPress() : this.focus()), ref: react_native_1.Platform.OS === 'web'
|
|
90
|
+
? //@ts-ignore
|
|
91
|
+
//removed while we fix the bug of textboxes closing modals
|
|
92
|
+
//ref => ref && ref.setNativeProps({ tabIndex: -1 })
|
|
93
|
+
undefined
|
|
94
|
+
: undefined },
|
|
95
|
+
React.createElement(react_native_1.View, { style: [styles.container, style, editable ? null : styles.readonly] },
|
|
96
|
+
icon ? (React.createElement(FontAwesome_1.default, { name: icon, style: styles.icon })) : (React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, label)),
|
|
97
|
+
renderInput
|
|
98
|
+
? renderInput(incomingProps)
|
|
99
|
+
: this.renderInput(incomingProps))));
|
|
98
100
|
}
|
|
99
101
|
}
|
|
100
102
|
exports.TextBox = TextBox;
|
|
@@ -45,7 +45,9 @@ class TimePicker extends React.Component {
|
|
|
45
45
|
render() {
|
|
46
46
|
const { label, style, disabled, value, nativeID } = this.props;
|
|
47
47
|
const styles = this.getStyles();
|
|
48
|
-
return (React.createElement(react_native_1.TouchableWithoutFeedback, { accessible: false, disabled: disabled
|
|
48
|
+
return (React.createElement(react_native_1.TouchableWithoutFeedback, { accessible: false, disabled: disabled,
|
|
49
|
+
//@ts-ignore
|
|
50
|
+
ref: ref => ref && ref.setNativeProps({ tabIndex: -1 }) },
|
|
49
51
|
React.createElement(react_native_1.View, { style: [styles.container, style, !disabled ? null : styles.readonly] },
|
|
50
52
|
React.createElement(react_native_1.Text, { style: styles.label }, label),
|
|
51
53
|
React.createElement(react_native_1.TextInput, { nativeID: nativeID, value: value, style: styles.input, maxLength: 5, onKeyPress: (e) => {
|