@zohodesk/components 1.0.0-temp-217.3 → 1.0.0-temp-217.5
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.
|
@@ -28,6 +28,7 @@ const Switch = props => {
|
|
|
28
28
|
labelPalette,
|
|
29
29
|
labelPlacement,
|
|
30
30
|
labelSize,
|
|
31
|
+
title,
|
|
31
32
|
customProps_container,
|
|
32
33
|
customProps_label,
|
|
33
34
|
tagAttributes_container,
|
|
@@ -91,9 +92,10 @@ const Switch = props => {
|
|
|
91
92
|
checked: isChecked,
|
|
92
93
|
disabled: isDisabled,
|
|
93
94
|
readOnly: isReadOnly,
|
|
94
|
-
|
|
95
|
+
onChange: !isDisabled || !isReadOnly ? onChange : null,
|
|
95
96
|
role: role,
|
|
96
97
|
className: trackClass,
|
|
98
|
+
"data-title": title,
|
|
97
99
|
...tagAttributes_switch,
|
|
98
100
|
...extraA11yAttributes_switch
|
|
99
101
|
}), /*#__PURE__*/React.createElement("svg", {
|
|
@@ -13,6 +13,7 @@ export default {
|
|
|
13
13
|
labelPalette: PropTypes.oneOf(['default', 'primary', 'secondary', 'danger', 'mandatory', 'disable', 'dark']),
|
|
14
14
|
labelPlacement: PropTypes.oneOf(['left', 'right']),
|
|
15
15
|
labelSize: PropTypes.oneOf(['xsmall', 'small', 'medium', 'large']),
|
|
16
|
+
title: PropTypes.string,
|
|
16
17
|
customProps_container: PropTypes.object,
|
|
17
18
|
customProps_label: PropTypes.object,
|
|
18
19
|
tagAttributes_container: PropTypes.object,
|
|
@@ -47,6 +47,7 @@ var Switch = function Switch(props) {
|
|
|
47
47
|
labelPalette = props.labelPalette,
|
|
48
48
|
labelPlacement = props.labelPlacement,
|
|
49
49
|
labelSize = props.labelSize,
|
|
50
|
+
title = props.title,
|
|
50
51
|
customProps_container = props.customProps_container,
|
|
51
52
|
customProps_label = props.customProps_label,
|
|
52
53
|
tagAttributes_container = props.tagAttributes_container,
|
|
@@ -106,9 +107,10 @@ var Switch = function Switch(props) {
|
|
|
106
107
|
checked: isChecked,
|
|
107
108
|
disabled: isDisabled,
|
|
108
109
|
readOnly: isReadOnly,
|
|
109
|
-
|
|
110
|
+
onChange: !isDisabled || !isReadOnly ? onChange : null,
|
|
110
111
|
role: role,
|
|
111
|
-
className: trackClass
|
|
112
|
+
className: trackClass,
|
|
113
|
+
"data-title": title
|
|
112
114
|
}, tagAttributes_switch, extraA11yAttributes_switch)), /*#__PURE__*/_react["default"].createElement("svg", {
|
|
113
115
|
className: thumbClass,
|
|
114
116
|
xmlns: "http://www.w3.org/2000/svg"
|
|
@@ -23,6 +23,7 @@ var _default = {
|
|
|
23
23
|
labelPalette: _propTypes["default"].oneOf(['default', 'primary', 'secondary', 'danger', 'mandatory', 'disable', 'dark']),
|
|
24
24
|
labelPlacement: _propTypes["default"].oneOf(['left', 'right']),
|
|
25
25
|
labelSize: _propTypes["default"].oneOf(['xsmall', 'small', 'medium', 'large']),
|
|
26
|
+
title: _propTypes["default"].string,
|
|
26
27
|
customProps_container: _propTypes["default"].object,
|
|
27
28
|
customProps_label: _propTypes["default"].object,
|
|
28
29
|
tagAttributes_container: _propTypes["default"].object,
|