import React from 'react'; import { MenuToggle, MenuItemAction, Select, SelectGroup, SelectList, SelectOption } from '@patternfly/react-core'; import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon'; import ClipboardIcon from '@patternfly/react-icons/dist/esm/icons/clipboard-icon'; import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon'; import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon'; export const ActionsMenuDemo: React.FunctionComponent = () => { const [isOpen, setIsOpen] = React.useState(false); const [selectedItems, setSelectedItems] = React.useState([]); const menuRef = React.useRef(null); const onSelect = (event: React.MouseEvent | undefined, value: string | number | undefined) => { if (typeof value === 'string' || typeof value === 'undefined') { return; } if (selectedItems.includes(value)) { setSelectedItems(selectedItems.filter((id) => id !== value)); } else { setSelectedItems([...selectedItems, value]); } }; const onToggleClick = () => { setIsOpen(!isOpen); }; return (
); };