Installation
npm install --save @types/react-key-value
Summary
This package contains type definitions for react-key-value (https://github.com/purposeindustries/react-key-value#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-key-value.
index.d.ts
import * as React from "react";
export class KeyValue extends React.Component<KeyValueProps> {
handleKeyItemChange(index: bigint, value: any): any;
handleRemove(index: bigint): any;
handleValueItemChange(index: bigint, value: any): any;
render(): any;
renderAddButton(): any;
renderKeyItem(index: bigint, value: any): any;
renderLabelText(text: string): any;
renderRows(): any;
renderValueItem(index: bigint, value: any): any;
toJSON(): any;
static displayName: string;
}
export interface KeyValueProps {
rows?: Array<{ keyItem: string; valueItem: string }>;
onChange?: (rows: Array<{ keyItem: string; valueItem: string }>) => void;
customAddButtonRenderer?: (handleAddNew: () => any) => React.ReactElement;
keyInputPlaceholder?: string;
valueInputPlaceholder?: string;
hideLabels?: boolean;
}
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: @types/react
Credits
These definitions were written by Chris Chow.