mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
refactor: Adjust formatting in Tabs component for improved readability
This commit is contained in:
@@ -32,18 +32,18 @@ const Tabs: FunctionComponent<ComponentProps> = (
|
||||
className="flex space-x-2 overflow-x-auto md:overflow-visible md:space-x-4"
|
||||
aria-label="Tabs"
|
||||
>
|
||||
{props.tabs.map((tab: Tab) => {
|
||||
return (
|
||||
<TabElement
|
||||
key={tab.name}
|
||||
tab={tab}
|
||||
onClick={() => {
|
||||
setCurrentTab(tab);
|
||||
}}
|
||||
isSelected={tab === currentTab}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
{props.tabs.map((tab: Tab) => {
|
||||
return (
|
||||
<TabElement
|
||||
key={tab.name}
|
||||
tab={tab}
|
||||
onClick={() => {
|
||||
setCurrentTab(tab);
|
||||
}}
|
||||
isSelected={tab === currentTab}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</nav>
|
||||
<div className="mt-3 ml-1">{currentTab && currentTab.children}</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user