@oliasoft-open-source/react-ui-library 3.2.2 → 3.2.3
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 +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14940,6 +14940,8 @@ const Drawer = ({
|
|
|
14940
14940
|
border: border2,
|
|
14941
14941
|
tabs: tabs2,
|
|
14942
14942
|
defaultTabIndex,
|
|
14943
|
+
activeTab: activeTabProp,
|
|
14944
|
+
setActiveTab: setActiveTabProp,
|
|
14943
14945
|
testId,
|
|
14944
14946
|
onResize,
|
|
14945
14947
|
getActiveTab
|
|
@@ -14947,7 +14949,7 @@ const Drawer = ({
|
|
|
14947
14949
|
const isStandardButton = button2 === true;
|
|
14948
14950
|
const isCustomButton = !isStandardButton && isValidElement(button2);
|
|
14949
14951
|
const [open, setOpen] = setOpenProp ? [openProp, setOpenProp] : isStandardButton || tabs2 ? useState(openProp) : [openProp, null];
|
|
14950
|
-
const [activeTab, setActiveTab] = useState(open ? defaultTabIndex : null);
|
|
14952
|
+
const [activeTab, setActiveTab] = setActiveTabProp ? [activeTabProp, setActiveTabProp] : useState(open ? defaultTabIndex : null);
|
|
14951
14953
|
const openWidth = Array.isArray(width) ? width[activeTab] : width;
|
|
14952
14954
|
const TABS_WIDTH = 37;
|
|
14953
14955
|
const currentWidth = open ? openWidth : tabs2 ? TABS_WIDTH : closedWidth;
|
|
@@ -15021,6 +15023,8 @@ Drawer.defaultProps = {
|
|
|
15021
15023
|
children: null,
|
|
15022
15024
|
tabs: null,
|
|
15023
15025
|
defaultTabIndex: 0,
|
|
15026
|
+
activeTab: void 0,
|
|
15027
|
+
setActiveTab: void 0,
|
|
15024
15028
|
testId: void 0,
|
|
15025
15029
|
onResize: null,
|
|
15026
15030
|
getActiveTab: null
|
|
@@ -15046,6 +15050,8 @@ Drawer.propTypes = {
|
|
|
15046
15050
|
})),
|
|
15047
15051
|
testId: propTypes$1.exports.string,
|
|
15048
15052
|
defaultTabIndex: propTypes$1.exports.number,
|
|
15053
|
+
activeTab: propTypes$1.exports.number,
|
|
15054
|
+
setActiveTab: propTypes$1.exports.func,
|
|
15049
15055
|
onResize: propTypes$1.exports.func,
|
|
15050
15056
|
getActiveTab: propTypes$1.exports.func
|
|
15051
15057
|
};
|