secullum-react-native-ui 4.8.1 → 4.10.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.
@@ -8,6 +8,7 @@ interface Props {
8
8
  style?: StyleProp<ViewStyle>;
9
9
  renderLabel?: () => React.ReactNode;
10
10
  labelStyle?: StyleProp<TextStyle>;
11
+ iconStyle?: StyleProp<TextStyle>;
11
12
  nativeID?: string;
12
13
  }
13
14
  export declare class CheckBox extends React.Component<Props> {
@@ -36,14 +36,14 @@ class CheckBox extends React.Component {
36
36
  };
37
37
  }
38
38
  render() {
39
- const { label, value, onChange, disabled, style, labelStyle, renderLabel, nativeID } = this.props;
39
+ const { label, value, onChange, disabled, style, labelStyle, iconStyle, renderLabel, nativeID } = this.props;
40
40
  const styles = this.getStyles();
41
41
  return (React.createElement(react_native_1.TouchableOpacity, { style: [styles.container, style], disabled: disabled, onPress: () => {
42
42
  if (onChange) {
43
43
  onChange(!value);
44
44
  }
45
45
  } },
46
- React.createElement(FontAwesome_1.default, { nativeID: nativeID, testID: (0, test_1.getTestID)(nativeID), name: value ? 'check-square-o' : 'square-o', style: styles.icon }),
46
+ React.createElement(FontAwesome_1.default, { nativeID: nativeID, testID: (0, test_1.getTestID)(nativeID), name: value ? 'check-square-o' : 'square-o', style: [styles.icon, iconStyle] }),
47
47
  React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, renderLabel ? renderLabel() : label)));
48
48
  }
49
49
  }
@@ -14,6 +14,7 @@ export interface DropDownProperties {
14
14
  emptyMessage?: string;
15
15
  disabled?: boolean;
16
16
  style?: StyleProp<ViewStyle>;
17
+ disabledStyle?: StyleProp<ViewStyle>;
17
18
  labelStyle?: StyleProp<TextStyle>;
18
19
  inputStyle?: StyleProp<TextStyle>;
19
20
  iconComponent?: React.ComponentClass<IconProps>;
@@ -232,12 +232,16 @@ class DropDown extends React.Component {
232
232
  }
233
233
  render() {
234
234
  const { modalOpen } = this.state;
235
- const { label, items, value, emptyMessage, style, disabled, labelStyle, inputStyle, iconComponent, nativeID, icon } = this.props;
235
+ const { label, items, value, emptyMessage, style, disabledStyle, disabled, labelStyle, inputStyle, iconComponent, nativeID, icon } = this.props;
236
236
  const selectedItem = items.find(x => x.value === value);
237
237
  const styles = this.getStyles();
238
238
  const theme = (0, theme_1.getTheme)();
239
239
  return (React.createElement(react_native_1.TouchableWithoutFeedback, { onPress: () => this.setState({ modalOpen: true }), disabled: disabled },
240
- React.createElement(react_native_1.View, { nativeID: nativeID, testID: (0, test_1.getTestID)(nativeID), style: [styles.container, style, disabled ? styles.readonly : null] },
240
+ React.createElement(react_native_1.View, { nativeID: nativeID, testID: (0, test_1.getTestID)(nativeID), style: [
241
+ styles.container,
242
+ style,
243
+ disabled ? [styles.readonly, disabledStyle] : null
244
+ ] },
241
245
  icon ? (React.createElement(FontAwesome_1.default, { name: icon, style: styles.iconOnLine })) : (React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, label)),
242
246
  this.renderClosedDropDown(selectedItem, inputStyle),
243
247
  React.createElement(Modal_1.Modal, { visible: modalOpen, onRequestClose: () => this.setState({ modalOpen: false }), overlayStyle: styles.modalOverlay },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secullum-react-native-ui",
3
- "version": "4.8.1",
3
+ "version": "4.10.0",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [
@@ -36,7 +36,7 @@
36
36
  "@types/react-native": "^0.63.64",
37
37
  "@types/react-native-drawer-layout": "^1.3.3",
38
38
  "@types/react-native-elevated-view": "^0.0.2",
39
- "@types/react-native-vector-icons": "^6.4.6",
39
+ "@types/react-native-vector-icons": "^6.4.18",
40
40
  "cross-env": "^7.0.3",
41
41
  "docz": "^0.11.2",
42
42
  "docz-plugin-css": "^0.11.0",