@lifi/widget 2.9.5 → 2.10.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/types/widget.d.ts CHANGED
@@ -17,6 +17,7 @@ export type DisabledUIType = `${DisabledUI}`;
17
17
  export declare enum HiddenUI {
18
18
  Appearance = "appearance",
19
19
  DrawerButton = "drawerButton",
20
+ DrawerCloseButton = "drawerCloseButton",
20
21
  History = "history",
21
22
  Language = "language",
22
23
  PoweredBy = "poweredBy",
@@ -122,6 +123,10 @@ export interface WidgetConfig {
122
123
  export type WidgetDrawerProps = {
123
124
  elementRef?: RefObject<HTMLDivElement>;
124
125
  open?: boolean;
126
+ /**
127
+ * Make sure to make the onClose callback stable (e.g. using useCallback) to avoid causing re-renders of the entire widget
128
+ */
129
+ onClose?(): void;
125
130
  };
126
131
  export interface WidgetConfigProps {
127
132
  config: WidgetConfig;
package/types/widget.js CHANGED
@@ -9,6 +9,7 @@ export var HiddenUI;
9
9
  (function (HiddenUI) {
10
10
  HiddenUI["Appearance"] = "appearance";
11
11
  HiddenUI["DrawerButton"] = "drawerButton";
12
+ HiddenUI["DrawerCloseButton"] = "drawerCloseButton";
12
13
  HiddenUI["History"] = "history";
13
14
  HiddenUI["Language"] = "language";
14
15
  HiddenUI["PoweredBy"] = "poweredBy";