import React from 'react'; import { Tabs, Tab, TabContent, Button, Divider } from '@patternfly/react-core'; export const TabsToggledSeparateContent: React.FunctionComponent = () => { const [activeTabKey, setActiveTabKey] = React.useState(0); const [isTab2Hidden, setisTab2Hidden] = React.useState(false); // Toggle currently active tab const handleTabClick = ( event: React.MouseEvent | React.KeyboardEvent | MouseEvent, tabIndex: string | number ) => { setActiveTabKey(tabIndex); }; const contentRef1 = React.createRef(); const contentRef2 = React.createRef(); const contentRef3 = React.createRef(); return (
{!isTab2Hidden && ( )}
Tab 1 section {!isTab2Hidden && ( Tab 2 section )} Tab 3 section
); };