@mw-kit/mw-ui 1.7.86 → 1.7.87
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/components/Tabs/interfaces.d.ts +11 -9
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +15 -1
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -19282,9 +19282,23 @@ var Tabs$1 = function Tabs$1(props) {
|
|
|
19282
19282
|
var _tab$provider = tab.provider,
|
|
19283
19283
|
Provider = _tab$provider === void 0 ? VoidProvider : _tab$provider,
|
|
19284
19284
|
Component = tab.component;
|
|
19285
|
+
|
|
19286
|
+
var setTab = function setTab(s) {
|
|
19287
|
+
setOptions(function (prev) {
|
|
19288
|
+
if (prev[index] !== tab) return prev;
|
|
19289
|
+
var newTab = typeof s === 'function' ? s(prev[index]) : s;
|
|
19290
|
+
if (prev[index] === newTab) return prev;
|
|
19291
|
+
var newTabs = [].concat(prev);
|
|
19292
|
+
newTabs[index] = _extends({}, prev[index], newTab);
|
|
19293
|
+
return newTabs;
|
|
19294
|
+
});
|
|
19295
|
+
};
|
|
19296
|
+
|
|
19285
19297
|
return React__default.createElement(Provider, Object.assign({
|
|
19286
19298
|
key: index,
|
|
19287
|
-
|
|
19299
|
+
label: tab.label,
|
|
19300
|
+
data: tab.data,
|
|
19301
|
+
setTab: setTab
|
|
19288
19302
|
}, index === active ? {
|
|
19289
19303
|
active: true,
|
|
19290
19304
|
children: React__default.createElement("div", null, React__default.createElement(Component, {
|