import React from 'react'; import { Drawer, DrawerContent, DrawerPanelContent } from '@patternfly/react-core'; import SidePanelContext, { SidePanelProps } from './SidePanelContext'; const SidePanelHost: React.FC> = ({ children }) => { const [props, setProps] = React.useState({ isExpanded: false, isInline: true }); const propsRef = React.useRef(props); propsRef.current = props; const close = React.useCallback(() => { setProps({ ...propsRef.current, isExpanded: false, minSize: 300 }); }, []); const panelContent = ( {props.children} ); return ( {children} ); }; export default SidePanelHost;