import React from 'react'; import { ExpandableSection, ExpandableSectionToggle, Stack, StackItem } from '@patternfly/react-core'; export const ExpandableSectionDetached: React.FunctionComponent = () => { const [isExpanded, setIsExpanded] = React.useState(false); const onToggle = (isExpanded: boolean) => { setIsExpanded(isExpanded); }; const contentId = 'detached-toggle-content'; return ( This content is visible only when the component is expanded. {isExpanded ? 'Show less' : 'Show more'} ); };