in src/main/js/components/tabs/tab-view.js [5:20]
function TabView({ tabs, currentTab, tabSelector }) {
if(currentTab === undefined || !tabSelector === undefined ) {
const [tabIndex, setTabIndex] = useState(0);
currentTab = tabIndex;
tabSelector = setTabIndex;
}
tabs.forEach(tab => {
if(! tab.hasOwnProperty('header') || !tab.hasOwnProperty('content')) {
throw new Error(`Expected 'header' and 'content' properties in TabView. Got: ${tab}`)
}
})
return (
<div className="w-full max-w-full min-w-full">
<Tabs selectedIndex={currentTab} onSelect={(index) => tabSelector(index)}>