secullum-react-native-ui 4.15.2-beta.7 → 4.15.2-beta.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/lib/components/Header.js
CHANGED
|
@@ -24,7 +24,8 @@ class Header extends React.Component {
|
|
|
24
24
|
color: theme.textColor4,
|
|
25
25
|
fontFamily: theme.fontFamily1,
|
|
26
26
|
fontSize: (0, layout_1.isTablet)() ? 22 : 18,
|
|
27
|
-
marginHorizontal:
|
|
27
|
+
marginHorizontal: 10,
|
|
28
|
+
flexShrink: 1
|
|
28
29
|
},
|
|
29
30
|
button: {
|
|
30
31
|
padding: (0, layout_1.isTablet)() ? 14 : 10
|
|
@@ -6,6 +6,14 @@ export interface ModalProperties {
|
|
|
6
6
|
overlayStyle?: StyleProp<ViewStyle>;
|
|
7
7
|
onRequestClose?: () => void;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
interface ModalState {
|
|
10
|
+
isContentReady: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare class Modal extends React.Component<ModalProperties, ModalState> {
|
|
13
|
+
state: {
|
|
14
|
+
isContentReady: boolean;
|
|
15
|
+
};
|
|
16
|
+
handleShow: () => void;
|
|
10
17
|
render(): JSX.Element;
|
|
11
18
|
}
|
|
19
|
+
export {};
|
package/lib/components/Modal.js
CHANGED
|
@@ -4,11 +4,23 @@ exports.Modal = void 0;
|
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const react_native_1 = require("react-native");
|
|
6
6
|
class Modal extends React.Component {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.state = {
|
|
10
|
+
isContentReady: false
|
|
11
|
+
};
|
|
12
|
+
this.handleShow = () => {
|
|
13
|
+
this.setState(prevState => ({ isContentReady: !prevState.isContentReady }));
|
|
14
|
+
};
|
|
15
|
+
}
|
|
7
16
|
render() {
|
|
8
17
|
const { children, visible, overlayStyle, onRequestClose } = this.props;
|
|
9
|
-
|
|
18
|
+
const { isContentReady } = this.state;
|
|
19
|
+
return (React.createElement(react_native_1.Modal, { animationType: "fade", transparent: true, visible: visible, supportedOrientations: ['landscape', 'portrait'], onRequestClose: onRequestClose, onShow: this.handleShow },
|
|
10
20
|
React.createElement(react_native_1.TouchableWithoutFeedback, { onPress: onRequestClose },
|
|
11
|
-
React.createElement(react_native_1.View, { style: [styles.overlay, overlayStyle] },
|
|
21
|
+
React.createElement(react_native_1.View, { style: [styles.overlay, overlayStyle] },
|
|
22
|
+
isContentReady && React.createElement(react_native_1.View, null),
|
|
23
|
+
children))));
|
|
12
24
|
}
|
|
13
25
|
}
|
|
14
26
|
exports.Modal = Modal;
|