import { useRef, useState } from 'react'; import { Gallery, Content, PageSection, GalleryItem, Card, CardBody, DrawerHead, DrawerActions, DrawerCloseButton, DrawerPanelBody, DescriptionList, DescriptionListTerm, DescriptionListGroup, DescriptionListDescription, Button, Title } from '@patternfly/react-core'; import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/DashboardWrapper'; import RhUiAddCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-add-circle-fill-icon'; export const DescriptionListInDrawer: React.FunctionComponent = () => { const drawerRef = useRef(null); const btnRef = useRef(null); const [isExpanded, setIsExpanded] = useState(true); const onExpand = () => { drawerRef.current && drawerRef.current.focus(); }; const onCloseClick = () => { setIsExpanded(false); btnRef.current && btnRef.current.focus(); }; const onToggleDrawer = () => { setIsExpanded((prevIsExpanded) => !prevIsExpanded); }; const panelContent = ( <> <span ref={drawerRef} tabIndex={isExpanded ? 0 : -1}> test </span> Name test Namespace mary-test Labels app=test Pod selector Node selector is not available at this time Tolerations No tolerations Annotations No annotaions Status Active Created at: 3 minutes agot Pod selector Session affinity None Latest version 1.0 Update strategy Rolling Timeout 600 seconds Max available 25% of 1 pod Max surge 25% greater than 1 pod ); const drawerContent = ( {Array.from({ length: 30 }).map((_value, index) => ( {`Card-${index + 1}`} ))} ); return ( Main title This is a full page demo. {drawerContent} ); };