@s-ui/react-atom-checkbox
Advanced tools
Comparing version 1.5.0 to 1.6.0
@@ -5,2 +5,14 @@ # Change Log | ||
<a name="1.6.0"></a> | ||
# 1.6.0 (2019-12-05) | ||
### Features | ||
* add compatibility ([a66651d](https://github.com/SUI-Components/sui-components/commit/a66651d)) | ||
* allow new prop to style checkbox ([f4db50d](https://github.com/SUI-Components/sui-components/commit/f4db50d)) | ||
* fix on icon prop ([4849d26](https://github.com/SUI-Components/sui-components/commit/4849d26)) | ||
<a name="1.5.0"></a> | ||
@@ -7,0 +19,0 @@ # 1.5.0 (2019-12-03) |
@@ -19,2 +19,4 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
var AtomCheckbox = function AtomCheckbox(_ref) { | ||
var _cx; | ||
var id = _ref.id, | ||
@@ -28,3 +30,4 @@ name = _ref.name, | ||
errorState = _ref.errorState, | ||
props = _objectWithoutPropertiesLoose(_ref, ["id", "name", "disabled", "checked", "onChange", "errorState"]); | ||
StyledIcon = _ref.styledIcon, | ||
props = _objectWithoutPropertiesLoose(_ref, ["id", "name", "disabled", "checked", "onChange", "errorState", "styledIcon"]); | ||
@@ -41,5 +44,6 @@ var handleChange = function handleChange(ev) { | ||
var className = cx(BASE_CLASS, getErrorStateClass(errorState)); | ||
return React.createElement(React.Fragment, null, React.createElement("input", Object.assign({ | ||
className: className, | ||
var className = cx(BASE_CLASS, getErrorStateClass(errorState), (_cx = {}, _cx[BASE_CLASS + "--styled"] = StyledIcon, _cx['is-checked'] = StyledIcon && checked, _cx)); | ||
return React.createElement("label", { | ||
className: className | ||
}, StyledIcon && checked ? React.createElement(StyledIcon, null) : '', React.createElement("input", Object.assign({ | ||
type: "checkbox", | ||
@@ -46,0 +50,0 @@ id: id, |
{ | ||
"name": "@s-ui/react-atom-checkbox", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
15641
83