DefinitelyTyped/types/ink-select-input/index.d.ts
Kubo Satnik b36aeafe88 Ink select input update for latest version and ink2 support (#34192)
* Update ink-select-input to support latest version and ink2

* Major version up

* Fix travis errors

* Fix travis errors

* Fixed travis errors 3
2019-03-27 16:15:22 -07:00

29 lines
856 B
TypeScript

// Type definitions for ink-select-input 3.0
// Project: https://github.com/vadimdemedes/ink-select-input#readme
// Definitions by: Łukasz Ostrowski <https://github.com/lukostry>
// Jakub Satnik <https://github.com/shatodj>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import { Component } from 'react';
export interface ItemOfSelectInput {
label: string;
value: any;
key?: string | number;
}
export interface SelectInputProps<T extends ItemOfSelectInput = ItemOfSelectInput> {
focus?: boolean;
indicatorComponent?: Component;
itemComponent?: Component;
items?: ReadonlyArray<T>;
limit?: number;
initialIndex?: number;
onSelect?: (item: T) => void;
}
declare class SelectInput extends Component<SelectInputProps> { }
export default SelectInput;