@councilbox/councilbox-ui 2.0.6 → 2.0.7
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.
|
@@ -16,7 +16,7 @@ a.noStyles:hover{
|
|
|
16
16
|
`}</style>
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
# Librería de componentes ui-councilbox NEW v2.0.
|
|
19
|
+
# Librería de componentes ui-councilbox NEW v2.0.7 🎉
|
|
20
20
|
|
|
21
21
|
<h2>Componentes:</h2>
|
|
22
22
|
<div><a class='noStyles' href='/story/components-accordion--default'>Accordion</a></div>
|
|
@@ -81,27 +81,28 @@ var Accordion = function Accordion(_ref) {
|
|
|
81
81
|
closePanel();
|
|
82
82
|
}, [disabled]);
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}, [disabled]);
|
|
87
|
-
|
|
88
|
-
var updatePanelHeight = function updatePanelHeight() {
|
|
84
|
+
var handleAccordionClick = function handleAccordionClick() {
|
|
85
|
+
setExpanded(!expanded);
|
|
89
86
|
var panel = panelRef.current;
|
|
90
87
|
|
|
91
88
|
if (panel) {
|
|
92
|
-
|
|
89
|
+
if (expanded) {
|
|
90
|
+
panel.style.maxHeight = null;
|
|
91
|
+
} else {
|
|
92
|
+
panel.style.maxHeight = "".concat(panel.scrollHeight, "px");
|
|
93
|
+
}
|
|
93
94
|
}
|
|
94
95
|
};
|
|
95
96
|
|
|
96
|
-
var handleAccordionClick = function handleAccordionClick() {
|
|
97
|
-
setExpanded(function (prev) {
|
|
98
|
-
return !prev;
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
|
|
102
97
|
_react.default.useEffect(function () {
|
|
103
|
-
|
|
104
|
-
|
|
98
|
+
if (expanded) {
|
|
99
|
+
var panel = panelRef.current;
|
|
100
|
+
|
|
101
|
+
if (panel) {
|
|
102
|
+
panel.style.maxHeight = "".concat(panel.scrollHeight, "px");
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}, [contentExpand]);
|
|
105
106
|
|
|
106
107
|
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
107
108
|
id: id,
|
|
@@ -240,7 +240,6 @@ var DropDown = function DropDown(_ref2) {
|
|
|
240
240
|
};
|
|
241
241
|
|
|
242
242
|
var handleClick = _react.default.useCallback(function (event) {
|
|
243
|
-
console.log('abre cabrón');
|
|
244
243
|
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
245
244
|
event === null || event === void 0 ? void 0 : event.preventDefault();
|
|
246
245
|
setIsOpen(true);
|