text: import { Dropdown, KebabToggle } from '@patternfly/react-core';
  import propTypes from 'prop-types';
  import React, { useState } from 'react';
  
  const BaseKebab = ({ dropdownItems, disabled, ...props }) => {
      const [isOpen, setOpen] = useState(false);
  
      function handleOnKebabToggle(kebabState) {
          setOpen(kebabState);
      }
  
      function handleOnKebabSelect() {
          setOpen(!isOpen);
      }
  
      return (
          <div>
              <Dropdown
                  onSelect={handleOnKebabSelect}
                  toggle={<KebabToggle onToggle={handleOnKebabToggle} isDisabled={disabled} />}
                  isOpen={isOpen}
                  isPlain
                  dropdownItems={dropdownItems}
                  {...props}
              />
          </div>
      );
  };
  
  BaseKebab.propTypes = {
      dropdownItems: propTypes.array,
      disabled: propTypes.bool
  };
  
  export default BaseKebab;
  