dibk-design 2.0.3 → 2.0.4

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.
@@ -14,9 +14,10 @@ var CheckBoxList = function CheckBoxList(props) {
14
14
  var renderChildElements = function renderChildElements(childElements) {
15
15
  return childElements.map(function (childElement, index) {
16
16
  var _childElement$type;
17
- if ((childElement === null || childElement === void 0 ? void 0 : (_childElement$type = childElement.type) === null || _childElement$type === void 0 ? void 0 : _childElement$type.name) === "CheckBoxListItem" && props.required) {
17
+ if ((childElement === null || childElement === void 0 ? void 0 : (_childElement$type = childElement.type) === null || _childElement$type === void 0 ? void 0 : _childElement$type.name) === "CheckBoxListItem") {
18
18
  var childElementCopy = _react.default.cloneElement(childElement, {
19
- requiredGroup: true,
19
+ requiredGroup: props.required,
20
+ compact: props.compact,
20
21
  key: "checkboxListItem-".concat(index)
21
22
  });
22
23
  return childElementCopy;
@@ -36,7 +37,8 @@ var CheckBoxList = function CheckBoxList(props) {
36
37
  };
37
38
  CheckBoxList.propTypes = {
38
39
  legend: _propTypes.default.string,
39
- required: _propTypes.default.bool
40
+ required: _propTypes.default.bool,
41
+ compact: _propTypes.default.bool
40
42
  };
41
43
  var _default = CheckBoxList;
42
44
  exports.default = _default;
@@ -14,9 +14,10 @@ var RadioButtonList = function RadioButtonList(props) {
14
14
  var renderChildElements = function renderChildElements(childElements) {
15
15
  return childElements.map(function (childElement, index) {
16
16
  var _childElement$type;
17
- if ((childElement === null || childElement === void 0 ? void 0 : (_childElement$type = childElement.type) === null || _childElement$type === void 0 ? void 0 : _childElement$type.name) === "RadioButtonListItem" && props.required) {
17
+ if ((childElement === null || childElement === void 0 ? void 0 : (_childElement$type = childElement.type) === null || _childElement$type === void 0 ? void 0 : _childElement$type.name) === "RadioButtonListItem") {
18
18
  var childElementCopy = _react.default.cloneElement(childElement, {
19
- requiredGroup: true,
19
+ requiredGroup: props.required,
20
+ compact: props.compact,
20
21
  key: "radioButtonListItem-".concat(index)
21
22
  });
22
23
  return childElementCopy;
@@ -36,7 +37,8 @@ var RadioButtonList = function RadioButtonList(props) {
36
37
  };
37
38
  RadioButtonList.propTypes = {
38
39
  legend: _propTypes.default.string,
39
- required: _propTypes.default.bool
40
+ required: _propTypes.default.bool,
41
+ compact: _propTypes.default.bool
40
42
  };
41
43
  var _default = RadioButtonList;
42
44
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dibk-design",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",