import React, { useState, } from 'react'; import PropTypes from 'prop-types'; import { Dropdown, DropdownItem, KebabToggle, DropdownPosition, Split, Icon, Text } from '@patternfly/react-core'; import { UndoIcon, TrashIcon } from '@patternfly/react-icons'; import { noop } from 'foremanReact/common/helpers'; import { translate as __ } from 'foremanReact/common/I18n'; const DeleteMenu = ({ handleModalToggle, akId }) => { const [isOpen, setIsOpen] = useState(false); const onToggle = (isOpenValue) => { setIsOpen(isOpenValue); }; const onFocus = () => { const element = document.getElementById('toggle-kebab'); element.focus(); }; const onSelect = () => { setIsOpen(false); onFocus(); }; const dropdownItems = [ {__('Delete')} , {__('Legacy UI')} ]; return ( } isOpen={isOpen} isPlain dropdownItems={dropdownItems} /> ); }; DeleteMenu.propTypes = { handleModalToggle: PropTypes.func, akId: PropTypes.string.isRequired, }; DeleteMenu.defaultProps = { handleModalToggle: noop, }; export default DeleteMenu;