diff --git a/app/client/src/components/designSystems/appsmith/TabsComponent.tsx b/app/client/src/components/designSystems/appsmith/TabsComponent.tsx index 5ba211dec0..72079c8916 100644 --- a/app/client/src/components/designSystems/appsmith/TabsComponent.tsx +++ b/app/client/src/components/designSystems/appsmith/TabsComponent.tsx @@ -9,6 +9,7 @@ interface TabsComponentProps extends ComponentProps { children?: ReactNode; shouldScrollContents?: boolean; selectedTabId: string; + shouldShowTabs: boolean; onTabChange: (tabId: string) => void; tabs: Array<{ id: string; @@ -112,22 +113,26 @@ const TabsComponent = (props: TabsComponentProps) => { }, [props.shouldScrollContents]); return ( - - {props.tabs && - props.tabs.map((tab, index) => ( - ) => { - props.onTabChange(tab.id); - event.stopPropagation(); - }} - selected={props.selectedTabId === tab.id} - key={index} - > - {tab.label} - - ))} - - + {props.shouldShowTabs ? ( + + {props.tabs && + props.tabs.map((tab, index) => ( + ) => { + props.onTabChange(tab.id); + event.stopPropagation(); + }} + selected={props.selectedTabId === tab.id} + key={index} + > + {tab.label} + + ))} + + + ) : ( + undefined + )} id: string; label: string; }>; + shouldShowTabs: boolean; children: T[]; snapColumns?: number; snapRows?: number;