hi-tm 0.20.5 → 0.20.6
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.
|
@@ -46,7 +46,7 @@ const Tabs = ({ data, badges = [], tabHandler, inLineCSS, onClick, activeId, ren
|
|
|
46
46
|
}, [activeId, data]);
|
|
47
47
|
return (react_1.default.createElement("ul", { style: inLineCSS || {}, className: "flex flex-row items-center justify-start bg-white gap-5", dir: "rtl" }, data.map((tab, index) => {
|
|
48
48
|
const badge = badges.find((b) => b.tabId === tab.id);
|
|
49
|
-
return (react_1.default.createElement("li", { key: index, className: `flex h-full w-fit cursor-pointer flex-row items-center justify-center px-[10px] pb-1 ${activeTab === index ? "border-b-2 border-blue-500" : ""}`, onClick: () => {
|
|
49
|
+
return (react_1.default.createElement("li", { key: index, className: `flex h-full w-fit cursor-pointer flex-row items-center justify-center px-[10px] pb-1 relative ${activeTab === index ? "border-b-2 border-blue-500" : ""}`, onClick: () => {
|
|
50
50
|
setActiveTab(index);
|
|
51
51
|
if (tabHandler)
|
|
52
52
|
tabHandler(tab);
|
|
@@ -54,7 +54,7 @@ const Tabs = ({ data, badges = [], tabHandler, inLineCSS, onClick, activeId, ren
|
|
|
54
54
|
onClick(tab.id);
|
|
55
55
|
} }, renderTab ? (renderTab(tab, badge)) : (react_1.default.createElement("div", { className: "flex items-center gap-2" },
|
|
56
56
|
tab.content,
|
|
57
|
-
badge && (react_1.default.createElement("span", { className: `inline-flex items-center justify-center px-
|
|
57
|
+
badge && (react_1.default.createElement("span", { className: `absolute -top-2 -left-2 inline-flex items-center justify-center px-1.5 py-0.5 text-xxs font-bold leading-none rounded-full ${badge.textColor} ${badge.badgeColor}` }, badge.count))))));
|
|
58
58
|
})));
|
|
59
59
|
};
|
|
60
60
|
exports.default = Tabs;
|