import './accessible-dropdown.styles.scss'; import React, { FC } from 'react'; declare type OverlayFunc = () => React.ReactElement; interface DropdownProps { /** * Array of menu items to be displayed in dropdown */ items?: Array; /** * Array of menu items to be displayed in dropdown */ overlay?: React.ReactElement | OverlayFunc; /** * Class name to be attached to dropdown container */ overlayClassName?: string; /** * Overwrites logic to decide when dropdown menu is visible */ visible?: boolean; /** * To set the container of the dropdown menu. The default is * to create a div element in body, but you can reset it to * the scrolling area and make a relative reposition. */ getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement; /** * Whether custom overlay should use pre-made overlay styles */ useOverlayStyles?: boolean; /** * Used to differentiate dropdown from others by adding a * class to important components */ uniqueIdentifier: String; /** * Placement of dropdown menu */ placement?: 'bottomLeft' | 'bottomCenter' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight'; /** * Whether dropdown should have arrow */ arrow?: boolean; /** * Whether the dropdown should toggle only on click * * default: false */ clickedTriggeredOnly?: boolean; /** * The element which triggers the dropdown * * If using a tab-able element such as