dhre-ui-kit 0.0.214 → 0.0.216

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/lib/index.d.ts CHANGED
@@ -360,7 +360,7 @@ interface AccordionProps {
360
360
  optionalElement?: () => React$1.ReactNode;
361
361
  headerComponent?: () => React$1.ReactNode;
362
362
  disabled?: boolean;
363
- icon: React$1.ReactElement;
363
+ icon?: React$1.ReactElement;
364
364
  titleVariant?: string;
365
365
  }
366
366
 
package/lib/index.js CHANGED
@@ -286,7 +286,7 @@ const ThemeContext = React.createContext(void 0);
286
286
  const ThemeProvider = ({ children }) => {
287
287
  const mode = reactRedux.useSelector((state) => state.theme.currentTheme);
288
288
  const filteredTheme = Object.keys(theme).reduce((acc, key) => {
289
- acc[key] = theme[key];
289
+ acc[key] = theme[key][mode];
290
290
  return acc;
291
291
  }, {});
292
292
  return /* @__PURE__ */ React__default["default"].createElement(ThemeContext.Provider, { value: { theme: filteredTheme, mode } }, children);
@@ -1996,11 +1996,11 @@ const Accordion = ({
1996
1996
  }
1997
1997
  }
1998
1998
  ),
1999
- React__default["default"].cloneElement(icon, {
1999
+ icon ? React__default["default"].cloneElement(icon, {
2000
2000
  width: moderateScale(20),
2001
2001
  height: moderateScale(20),
2002
2002
  style: styles$m.iconStyle
2003
- })
2003
+ }) : null
2004
2004
  ),
2005
2005
  optionalElement ? optionalElement() : null,
2006
2006
  isOpen && /* @__PURE__ */ React__default["default"].createElement(reactNative.Animated.View, { style: [styles$m.content, { height: cardHeight }] }, /* @__PURE__ */ React__default["default"].createElement(