react-customize-token-input
Version:
A react token (tag) input component. Allow customize data structure and Look & Feel
13 lines (12 loc) • 449 B
TypeScript
import type { Index } from '../types/token';
import type { OnTokenValuesChange } from '../types/interfaces';
interface Params<VT> {
tokenValues: VT[];
onTokenValuesChange?: OnTokenValuesChange<VT>;
focusTokenCreator: HTMLInputElement['focus'];
}
declare function useTokenDelete<VT>(params: Params<VT>): {
handleTokenDelete: (targetIndex: Index) => () => void;
handleLastTokenDelete: () => void;
};
export default useTokenDelete;