@zohodesk/components 1.0.0-temp-114 → 1.0.0-temp-115

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.
@@ -11,5 +11,6 @@ export const defaultProps = {
11
11
  size: 'medium',
12
12
  status: 'none',
13
13
  text: 'Button',
14
- customClass: {}
14
+ customClass: {},
15
+ customProps: {}
15
16
  };
@@ -18,5 +18,6 @@ export const propTypes = {
18
18
  customButton: PropTypes.string,
19
19
  customStatus: PropTypes.string,
20
20
  customStatusSize: PropTypes.string
21
- })
21
+ }),
22
+ customProps: PropTypes.object
22
23
  };
@@ -55,8 +55,7 @@ export default class Switch extends React.Component {
55
55
  "data-title": disabled ? disableTitle : title,
56
56
  "aria-checked": checked,
57
57
  role: "switch",
58
- tabIndex: isReadOnly || disabled ? '-1' : '0',
59
- onClick: !disabled || !isReadOnly ? this.onChange : null
58
+ tabIndex: isReadOnly || disabled ? '-1' : '0'
60
59
  }, SwitchProps), /*#__PURE__*/React.createElement(Box, {
61
60
  className: `${style[size]} ${customSwitchSize}`
62
61
  }, /*#__PURE__*/React.createElement("input", {
@@ -67,8 +66,8 @@ export default class Switch extends React.Component {
67
66
  value: value,
68
67
  checked: checked,
69
68
  disabled: disabled,
70
- readOnly: isReadOnly
71
- // onClick={!disabled || !isReadOnly ? this.onChange : null}
69
+ readOnly: isReadOnly,
70
+ onClick: !disabled || !isReadOnly ? this.onChange : null
72
71
  }), /*#__PURE__*/React.createElement("label", {
73
72
  htmlFor: id,
74
73
  "data-id": dataId,
@@ -78,9 +77,8 @@ export default class Switch extends React.Component {
78
77
  palette: labelPalette,
79
78
  id: id,
80
79
  size: labelSize,
81
- type: "subtitle"
82
- // onClick={!disabled || !isReadOnly ? this.onChange : null}
83
- ,
80
+ type: "subtitle",
81
+ onClick: !disabled || !isReadOnly ? this.onChange : null,
84
82
  customClass: customLabel
85
83
  }, LabelProps)));
86
84
  }
@@ -17,6 +17,7 @@ var defaultProps = {
17
17
  size: 'medium',
18
18
  status: 'none',
19
19
  text: 'Button',
20
- customClass: {}
20
+ customClass: {},
21
+ customProps: {}
21
22
  };
22
23
  exports.defaultProps = defaultProps;
@@ -25,6 +25,7 @@ var propTypes = {
25
25
  customButton: _propTypes["default"].string,
26
26
  customStatus: _propTypes["default"].string,
27
27
  customStatusSize: _propTypes["default"].string
28
- })
28
+ }),
29
+ customProps: _propTypes["default"].object
29
30
  };
30
31
  exports.propTypes = propTypes;
@@ -82,8 +82,7 @@ var Switch = /*#__PURE__*/function (_React$Component) {
82
82
  "data-title": disabled ? disableTitle : title,
83
83
  "aria-checked": checked,
84
84
  role: "switch",
85
- tabIndex: isReadOnly || disabled ? '-1' : '0',
86
- onClick: !disabled || !isReadOnly ? this.onChange : null
85
+ tabIndex: isReadOnly || disabled ? '-1' : '0'
87
86
  }, SwitchProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
88
87
  className: "".concat(_SwitchModule["default"][size], " ").concat(customSwitchSize)
89
88
  }, /*#__PURE__*/_react["default"].createElement("input", {
@@ -94,8 +93,8 @@ var Switch = /*#__PURE__*/function (_React$Component) {
94
93
  value: value,
95
94
  checked: checked,
96
95
  disabled: disabled,
97
- readOnly: isReadOnly
98
- // onClick={!disabled || !isReadOnly ? this.onChange : null}
96
+ readOnly: isReadOnly,
97
+ onClick: !disabled || !isReadOnly ? this.onChange : null
99
98
  }), /*#__PURE__*/_react["default"].createElement("label", {
100
99
  htmlFor: id,
101
100
  "data-id": dataId,
@@ -105,9 +104,8 @@ var Switch = /*#__PURE__*/function (_React$Component) {
105
104
  palette: labelPalette,
106
105
  id: id,
107
106
  size: labelSize,
108
- type: "subtitle"
109
- // onClick={!disabled || !isReadOnly ? this.onChange : null}
110
- ,
107
+ type: "subtitle",
108
+ onClick: !disabled || !isReadOnly ? this.onChange : null,
111
109
  customClass: customLabel
112
110
  }, LabelProps)));
113
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/components",
3
- "version": "1.0.0-temp-114",
3
+ "version": "1.0.0-temp-115",
4
4
  "main": "es/index.js",
5
5
  "module": "es/index.js",
6
6
  "private": false,