import { FunctionComponent, useState, useRef } from 'react'; import { Slider, SliderOnChangeEvent } from '@patternfly/react-core'; import { ResponsiveActions } from '@patternfly/react-component-groups/dist/dynamic/ResponsiveActions'; import { ResponsiveAction } from '@patternfly/react-component-groups/dist/dynamic/ResponsiveAction'; export const ResponsiveActionsBreakpointExample: FunctionComponent = () => { const [ containerWidth, setContainerWidth ] = useState(100); const containerRef = useRef(null); const onChange = (_event: SliderOnChangeEvent, value: number) => { setContainerWidth(value); }; const containerStyles = { width: `${containerWidth}%`, padding: '1rem', borderWidth: '2px', borderStyle: 'dashed' }; return ( <>
Current container width:{' '} {containerWidth}%
Persistent Action Pinned Action 1 Pinned Action 2 Overflow Action
); };