import { useState } from 'react'; import { Card, CardHeader, CardBody, Grid, GridItem, PageSection, Tabs, Tab, TabContent, TabContentBody, TabTitleText, Title, TitleSizes, Flex, FlexItem } from '@patternfly/react-core'; import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/DashboardWrapper'; import sizing from '@patternfly/react-styles/css/utilities/Sizing/sizing'; export const NestedTabs: React.FunctionComponent = () => { const [activeTabKey, setActiveTabKey] = useState(0); const [activeNestedTabKey, setActiveNestedTabKey] = useState(10); // Toggle currently active tab const handleTabClick = (tabIndex: number) => setActiveTabKey(tabIndex); // Toggle currently active nested tab const handleNestedTabClick = (tabIndex: number) => setActiveNestedTabKey(tabIndex); const tabContent = ( Status handleNestedTabClick(Number(tabIndex))} id="nested-tabs-example-nested-tabs-list" > Cluster} tabContentId={`tabContent${10}`} /> Control plane} tabContentId={`tabContent${11}`} /> Operators} tabContentId={`tabContent${12}`} /> Virtualization} tabContentId={`tabContent${13}`} /> Title of card Title of card ); return ( handleTabClick(Number(tabIndex))} usePageInsets id="nested-tabs-example-tabs-list" > Cluster 1} tabContentId={`tabContent${0}`} /> Cluster 2} tabContentId={`tabContent${1}`} /> ); };