react-tab-component-pure-js
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -30,8 +30,14 @@ "use strict"; | ||
children: [(0, jsx_runtime_1.jsx)("div", __assign({ | ||
className: tabOptionsClass | ||
className: tabOptionsClass, | ||
role: "tablist", | ||
"aria-label": "Tabs" | ||
}, { | ||
children: tabList.map(function (_a, index) { | ||
var name = _a.name; | ||
return (0, jsx_runtime_1.jsx)("div", __assign({ | ||
return (0, jsx_runtime_1.jsx)("button", __assign({ | ||
className: currentTabIndex === index ? selectTabClass : unselectedTabClass, | ||
role: "tab", | ||
"aria-selected": currentTabIndex === index, | ||
"aria-controls": "tabpanel-".concat(index), | ||
id: "tab-".concat(index), | ||
onClick: function onClick() { | ||
@@ -46,3 +52,10 @@ return tabClickHandler(index); | ||
var Component = _a.Component; | ||
return index === currentTabIndex ? (0, jsx_runtime_1.jsx)(Component, {}, index) : null; | ||
return (0, jsx_runtime_1.jsx)("div", __assign({ | ||
role: "tabpanel", | ||
id: "tabpanel-".concat(index), | ||
"aria-labelledby": "tab-".concat(index), | ||
hidden: currentTabIndex !== index | ||
}, { | ||
children: currentTabIndex === index && (0, jsx_runtime_1.jsx)(Component, {}) | ||
}), index); | ||
})] | ||
@@ -49,0 +62,0 @@ })); |
{ | ||
"name": "react-tab-component-pure-js", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5973
78