oa-componentbook 0.18.162 → 0.18.163
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.
|
@@ -32,6 +32,8 @@ function Accordion(_ref2) {
|
|
|
32
32
|
disabled,
|
|
33
33
|
headerText,
|
|
34
34
|
smallText,
|
|
35
|
+
key,
|
|
36
|
+
defaultActiveKey,
|
|
35
37
|
hasContentPadding // New prop to determine whether to apply contentPadding
|
|
36
38
|
} = _ref2;
|
|
37
39
|
const themeConfig = {
|
|
@@ -47,11 +49,11 @@ function Accordion(_ref2) {
|
|
|
47
49
|
}, /*#__PURE__*/_react.default.createElement(_styles.CollapseStyle, null, /*#__PURE__*/_react.default.createElement(_antd.Collapse, {
|
|
48
50
|
expandIcon: CollapseIcon,
|
|
49
51
|
expandIconPosition: "end",
|
|
50
|
-
defaultActiveKey: disabled ? '-1' :
|
|
52
|
+
defaultActiveKey: disabled ? '-1' : defaultActiveKey
|
|
51
53
|
}, /*#__PURE__*/_react.default.createElement(_antd.Collapse.Panel, {
|
|
52
54
|
"data-test": dataTest ? "".concat(dataTest, "--complete") : undefined,
|
|
53
55
|
collapsible: disabled ? 'disabled' : undefined,
|
|
54
|
-
key:
|
|
56
|
+
key: key,
|
|
55
57
|
header: /*#__PURE__*/_react.default.createElement("div", {
|
|
56
58
|
"data-test": dataTest ? "".concat(dataTest, "--header") : undefined,
|
|
57
59
|
className: "type-button-500"
|
|
@@ -66,13 +68,18 @@ Accordion.propTypes = {
|
|
|
66
68
|
disabled: _propTypes.default.bool,
|
|
67
69
|
headerText: _propTypes.default.string.isRequired,
|
|
68
70
|
smallText: _propTypes.default.string,
|
|
69
|
-
hasContentPadding: _propTypes.default.bool
|
|
71
|
+
hasContentPadding: _propTypes.default.bool,
|
|
72
|
+
// New prop for controlling contentPadding
|
|
73
|
+
key: _propTypes.default.string,
|
|
74
|
+
defaultActiveKey: _propTypes.default.string
|
|
70
75
|
};
|
|
71
76
|
Accordion.defaultProps = {
|
|
72
77
|
body: '',
|
|
73
78
|
'data-test': null,
|
|
74
79
|
disabled: false,
|
|
75
80
|
smallText: '',
|
|
81
|
+
key: '1',
|
|
82
|
+
defaultActiveKey: '1',
|
|
76
83
|
hasContentPadding: true // Default value for contentPadding
|
|
77
84
|
};
|
|
78
85
|
var _default = exports.default = Accordion;
|