@widergy/mobile-ui 0.37.7 → 0.38.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # [0.38.0](https://github.com/widergy/mobile-ui/compare/v0.37.7...v0.38.0) (2023-08-11)
2
+
3
+
4
+ ### Features
5
+
6
+ * add disabled prop ([139f5ba](https://github.com/widergy/mobile-ui/commit/139f5ba1c9247d2e1dd5c38c5868cff1ea02e676))
7
+ * fix comments ([6731f8e](https://github.com/widergy/mobile-ui/commit/6731f8e3b33b28d68ce1dfd5ceebb2ae12b54099))
8
+
1
9
  ## [0.37.7](https://github.com/widergy/mobile-ui/compare/v0.37.6...v0.37.7) (2023-07-26)
2
10
 
3
11
 
@@ -81,7 +81,7 @@ class FilePicker extends Component {
81
81
  };
82
82
 
83
83
  render() {
84
- const { error, title, filePlaceholder, style, withMarkdownTitle, markdownStyles } = this.props;
84
+ const { error, title, filePlaceholder, style, withMarkdownTitle, markdownStyles, disabled } = this.props;
85
85
  const { fileName } = this.state;
86
86
  return (
87
87
  <View style={style}>
@@ -95,6 +95,7 @@ class FilePicker extends Component {
95
95
  title={title}
96
96
  withMarkdownTitle={withMarkdownTitle}
97
97
  markdownStyles={markdownStyles}
98
+ disabled={disabled}
98
99
  />
99
100
  </View>
100
101
  );
@@ -12,5 +12,6 @@ export default {
12
12
  fileTypeError: string,
13
13
  allowedPDFUploadSizes: arrayOf(
14
14
  shape({ name: string, heightInPt: number, widthInPt: number, tolerance: number })
15
- )
15
+ ),
16
+ disabled: bool
16
17
  };
@@ -21,7 +21,8 @@ const Picker = ({
21
21
  title,
22
22
  theme,
23
23
  withMarkdownTitle,
24
- markdownStyles
24
+ markdownStyles,
25
+ disabled
25
26
  }) => (
26
27
  <Fragment>
27
28
  {!!title && (
@@ -46,7 +47,8 @@ const Picker = ({
46
47
  showButton && {
47
48
  name: fileName ? 'delete' : icon,
48
49
  color: theme.picker.iconColor,
49
- onPress: fileName ? onDelete : onAdd
50
+ onPress: fileName ? onDelete : onAdd,
51
+ disabled
50
52
  }
51
53
  }
52
54
  error={error}
@@ -67,7 +69,8 @@ Picker.propTypes = {
67
69
  showButton: bool,
68
70
  theme: themeType,
69
71
  withMarkdownTitle: bool,
70
- markdownStyles: shape({ ViewPropTypes })
72
+ markdownStyles: shape({ ViewPropTypes }),
73
+ disabled: bool
71
74
  };
72
75
 
73
76
  Picker.defaultProps = {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@widergy/mobile-ui",
3
3
  "description": "Widergy Mobile Components",
4
4
  "author": "widergy",
5
- "version": "0.37.7",
5
+ "version": "0.38.0",
6
6
  "repository": "https://github.com/widergy/mobile-ui.git",
7
7
  "main": "lib/index.js",
8
8
  "files": [