From 602e8cb5f76a5d6066ac44bab55430f8e5fa80ac Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Tue, 5 Mar 2024 21:42:38 +0100 Subject: [PATCH] Drop custom unused Dropdown component --- src/Dropdown.jsx | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 src/Dropdown.jsx diff --git a/src/Dropdown.jsx b/src/Dropdown.jsx deleted file mode 100644 index d78ffffe1..000000000 --- a/src/Dropdown.jsx +++ /dev/null @@ -1,37 +0,0 @@ -import React, { useState } from 'react'; -import { Dropdown, DropdownItem, DropdownToggle, DropdownToggleAction } from '@patternfly/react-core/dist/esm/deprecated/components/Dropdown/index.js'; - -export const DropDown = ({ actions }) => { - const [isOpen, setIsOpen] = useState(false); - const dropdownItems = actions - .map(button => { - return ( - - {button.label} - - ); - }); - - return ( - setIsOpen(!isOpen)} - id={actions[0].label + "-dropdown"} - toggle={ - - {actions[0].label} - - ]} - splitButtonVariant="action" - onToggle={(_event, open) => setIsOpen(open)} - /> - } - isOpen={isOpen} - dropdownItems={dropdownItems} - /> - ); -}; -DropDown.defaultProps = { - actions: [{ label: '' }] -};