@7shifts/sous-chef 3.80.0 → 3.81.0

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.
package/dist/index.js CHANGED
@@ -10034,12 +10034,15 @@ var styles$w = {"accordion":"_058SP"};
10034
10034
 
10035
10035
  var Accordion = function Accordion(props) {
10036
10036
  var items = props.items,
10037
- onExpand = props.onExpand;
10038
- var _useState = React.useState(),
10037
+ onExpand = props.onExpand,
10038
+ defaultOpenId = props.defaultOpenId;
10039
+ var _useState = React.useState(function () {
10040
+ return defaultOpenId || null;
10041
+ }),
10039
10042
  activeId = _useState[0],
10040
10043
  setActiveId = _useState[1];
10041
10044
  var handleAccordionItemOpen = function handleAccordionItemOpen(item) {
10042
- setActiveId(item ? item.id : null);
10045
+ setActiveId((item == null ? void 0 : item.id) || null);
10043
10046
  item && onExpand && onExpand(item);
10044
10047
  };
10045
10048
  if (items.length < 1) {