secullum-react-native-ui 4.6.1 → 4.6.3-beta.0

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,8 +1,13 @@
1
1
  import * as React from 'react';
2
- export declare class Loading extends React.Component {
2
+ declare type Props = {
3
+ width?: number | string;
4
+ height?: number | string;
5
+ };
6
+ export declare class Loading extends React.Component<Props> {
3
7
  getWidthAndHeight: () => {
4
- width: number;
5
- height: number;
8
+ width: string | number;
9
+ height: string | number;
6
10
  };
7
11
  render(): JSX.Element;
8
12
  }
13
+ export {};
@@ -8,9 +8,10 @@ class Loading extends React.Component {
8
8
  super(...arguments);
9
9
  this.getWidthAndHeight = () => {
10
10
  const dim = react_native_1.Platform.OS === 'web' ? 'window' : 'screen';
11
+ const { width, height } = this.props;
11
12
  return {
12
- width: react_native_1.Dimensions.get(dim).width,
13
- height: react_native_1.Dimensions.get(dim).height
13
+ width: width ? width : react_native_1.Dimensions.get(dim).width,
14
+ height: height ? height : react_native_1.Dimensions.get(dim).height
14
15
  };
15
16
  };
16
17
  }
@@ -86,12 +86,15 @@ class TextBox extends React.Component {
86
86
  this.props.onKeyPress(react_native_1.Platform.OS === 'web' ? event : event.nativeEvent);
87
87
  }
88
88
  };
89
- return (React.createElement(react_native_1.TouchableWithoutFeedback, { accessible: false, onPress: () => (onPress ? onPress() : this.focus()) },
90
- React.createElement(react_native_1.View, { style: [styles.container, style, editable ? null : styles.readonly] },
91
- icon ? (React.createElement(FontAwesome_1.default, { name: icon, style: styles.icon })) : (React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, label)),
92
- renderInput
93
- ? renderInput(incomingProps)
94
- : this.renderInput(incomingProps))));
89
+ const content = (React.createElement(react_native_1.View, { style: [styles.container, style, editable ? null : styles.readonly] },
90
+ icon ? (React.createElement(FontAwesome_1.default, { name: icon, style: styles.icon })) : (React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, label)),
91
+ renderInput
92
+ ? renderInput(incomingProps)
93
+ : this.renderInput(incomingProps)));
94
+ if (react_native_1.Platform.OS === 'web') {
95
+ return (React.createElement("div", { onClick: () => (onPress ? onPress() : this.focus()) }, content));
96
+ }
97
+ return (React.createElement(react_native_1.TouchableWithoutFeedback, { accessible: false, onPress: () => (onPress ? onPress() : this.focus()) }, content));
95
98
  }
96
99
  }
97
100
  exports.TextBox = TextBox;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secullum-react-native-ui",
3
- "version": "4.6.1",
3
+ "version": "4.6.3-beta.0",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [