node/@patternfly/react-core/src/components/ExpandableSection/examples/ExpandableSectionUncontrolledDynamicToggleFunction.tsx
raw| 1 | import { ExpandableSection } from '@patternfly/react-core'; |
| 2 | |
| 3 | export const ExpandableSectionUncontrolledDynamicToggleFunction: React.FunctionComponent = () => ( |
| 4 | <ExpandableSection |
| 5 | toggleContent={(isExpanded) => |
| 6 | isExpanded |
| 7 | ? 'Show less uncontrolled dynamic toggle example content' |
| 8 | : 'Show more uncontrolled dynamic toggle example content' |
| 9 | } |
| 10 | > |
| 11 | This content is visible only when the component is expanded. |
| 12 | </ExpandableSection> |
| 13 | ); |