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.
@@ -32,6 +32,7 @@ export declare class Header extends React.Component<HeaderProperties> {
32
32
  fontFamily: string;
33
33
  fontSize: number;
34
34
  marginHorizontal: number;
35
+ flexShrink: number;
35
36
  };
36
37
  button: {
37
38
  padding: number;
@@ -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: 35
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
- export declare class Modal extends React.Component<ModalProperties> {
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 {};
@@ -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
- return (React.createElement(react_native_1.Modal, { animationType: "fade", transparent: true, visible: visible, supportedOrientations: ['landscape', 'portrait'], onRequestClose: onRequestClose },
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] }, children))));
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secullum-react-native-ui",
3
- "version": "4.15.2-beta.7",
3
+ "version": "4.15.2-beta.9",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [