@oliasoft-open-source/react-ui-library 2.4.9 → 2.4.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "2.4.9",
3
+ "version": "2.4.10",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -25,6 +25,7 @@ export const Drawer = ({
25
25
  defaultTabIndex,
26
26
  testId,
27
27
  onResize,
28
+ getActiveTab,
28
29
  }) => {
29
30
  const isStandardButton = button === true;
30
31
  const isCustomButton = !isStandardButton && isValidElement(button);
@@ -43,6 +44,9 @@ export const Drawer = ({
43
44
  setActiveTab(index);
44
45
  setOpen(true);
45
46
  }
47
+ if (getActiveTab) {
48
+ getActiveTab(tabs[index]);
49
+ }
46
50
  };
47
51
 
48
52
  return (
@@ -125,6 +129,7 @@ Drawer.defaultProps = {
125
129
  defaultTabIndex: 0,
126
130
  testId: undefined,
127
131
  onResize: null,
132
+ getActiveTab: null,
128
133
  };
129
134
 
130
135
  Drawer.propTypes = {
@@ -158,4 +163,5 @@ Drawer.propTypes = {
158
163
  testId: PropTypes.string,
159
164
  defaultTabIndex: PropTypes.number,
160
165
  onResize: PropTypes.func,
166
+ getActiveTab: PropTypes.func,
161
167
  };