import React, { PureComponent } from 'react'; import { PickDefaultProps } from '../utils-typescript'; import { ButtonProps } from '../Button/button'; declare type DropDownId = string; interface IconButtonDropDownTheme { readonly 'wrapper': string; readonly 'wrapper__btn': string; readonly 'wrapper__btnModeIcon': string; readonly 'wrapper__dropDown': string; readonly 'wrapper__dropDown--isOpen': string; readonly 'wrapper__dropDownItem': string; readonly 'wrapper__btnIcon': string; } export interface IconButtonDropDownProps { /** * The key of the Icon which is always displayed. */ readonly icon: string; /** * Children to be rendered inside the DropDown. */ readonly children: ReadonlyArray>; /** * You can pass an modeIcon which displays the current selected item in a leaner way. * Modify this prop via listening to the `onItemSelect` propType. */ readonly modeIcon: string; /** * Will be called once the user clicks on the wrapper if * it is NOT opened right meow. */ readonly onClick: () => void; /** * Will be called once the user selects an item. * You should specify an `dropDownId` prop on each child, * which will then be propagated to this handler as the first * and only argument. */ readonly onItemSelect: (id: DropDownId) => void; /** * An optional css theme to be injected. */ readonly theme?: IconButtonDropDownTheme; /** * An optional `className` to attach to the wrapper. */ readonly className?: string; /** * Controls the whole components disabled state. */ readonly disabled: boolean; /** * Props which are propagated to the