@equinor/echo-components 0.5.18 → 0.5.19

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.
@@ -0,0 +1,9 @@
1
+ import { PanelSize } from '@types';
2
+ import * as zustand from 'zustand';
3
+ export interface PanelState {
4
+ activePanel: string | undefined;
5
+ panelSize: PanelSize;
6
+ updateActivePanel: (newActivePanel: string | undefined) => void;
7
+ updatePanelSize: (newPanelSize: PanelSize) => void;
8
+ }
9
+ export declare const usePanelStore: zustand.UseBoundStore<zustand.StoreApi<PanelState>>;
@@ -1,5 +1,5 @@
1
1
  export * from './menuButton/MenuButton';
2
2
  export * from './panel/Panel';
3
3
  export * from './panelContent/PanelContent';
4
+ export * from './PanelStore';
4
5
  export * from './panelWrapper/PanelWrapper';
5
- export * from './usePanelContext';
@@ -4,7 +4,6 @@ interface MenuButtonProps {
4
4
  active: boolean;
5
5
  onClick: (event?: React.MouseEvent<HTMLButtonElement>) => void;
6
6
  children: React.ReactNode;
7
- refValue?: React.RefObject<HTMLButtonElement>;
8
7
  id?: string;
9
8
  }
10
9
  /**
@@ -17,10 +16,9 @@ interface MenuButtonProps {
17
16
  * active, boolean describing the buttons active state
18
17
  * children, the icon to be displayed
19
18
  * onClick, the on click event
20
- * refValue, a reference value in case its needed
21
19
  * id: the id of the button in case its needed
22
20
  * }
23
21
  * @return {*} {JSX.Element}
24
22
  */
25
- declare const MenuButton: React.FC<MenuButtonProps>;
23
+ declare const MenuButton: React.ForwardRefExoticComponent<MenuButtonProps & React.RefAttributes<HTMLButtonElement | null>>;
26
24
  export default MenuButton;
@@ -3,6 +3,7 @@ interface PanelContentProps {
3
3
  header: string;
4
4
  children: React.ReactNode;
5
5
  backToMainPanel?: () => void;
6
+ footer?: React.ReactNode;
6
7
  }
7
8
  /**
8
9
  * The component that wraps the panel drawer content
@@ -13,7 +14,8 @@ interface PanelContentProps {
13
14
  * header, the header text to display
14
15
  * children, the panels content
15
16
  * backToMainPanel: optional parameter that controls whether the panel should have a back button or not
16
- * to be used in cases where there are panels within panels
17
+ * to be used in cases where there are panels within panels,
18
+ * footer: optional param, if used a footer will be shown in the panel content
17
19
  * }
18
20
  * @return {*} {JSX.Element}
19
21
  */