UNPKG

@guardian/threads

Version:
15 lines (14 loc) 528 B
import { Component, KeyboardEventHandler } from 'react'; export interface ChipProps { index: number; value: string; label?: string; onUpdate: (index: number, value: string, label?: string) => void; focusElement: (index: number, atEnd: boolean) => void; deleteChip: (index: number) => void; } export declare abstract class Chip<P extends ChipProps, S = {}> extends Component<P, S> { abstract focus(focusEnd: boolean): void; abstract select(): void; abstract onKeyDown: KeyboardEventHandler; }