Skip to content
This repository has been archived by the owner on Dec 23, 2022. It is now read-only.

Commit

Permalink
update typings
Browse files Browse the repository at this point in the history
  • Loading branch information
pantharshit00 committed Oct 7, 2018
1 parent 68e1864 commit 64c8c56
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
import * as React from 'react';
import { FormHelperTextProps } from '@material-ui/core/FormHelperText'

interface Props {
export interface ChipRendererArgs {
value: string;
text: string;
chip: string;
isFocused: boolean;
isDisabled: boolean;
handleClick: React.EventHandler<any>;
handleDelete: React.EventHandler<any>;
className: string;
}

export type ChipRenderer = (
args: ChipRendererArgs,
key: number
) => React.ReactNode;

export interface Props {
allowDuplicates?: boolean;
blurBehavior?: 'clear' | 'add' | 'ignore';
chipRenderer?: (...args: any[]) => any;
chipRenderer?: ChipRenderer;
clearInputValueOnChange?: boolean;
dataSource?: any[];
dataSourceConfig?: {
Expand All @@ -12,20 +29,20 @@ interface Props {
};
defaultValue?: any[];
disabled?: boolean;
FormHelperTextProps?: object;
FormHelperTextProps?: FormHelperTextProps;
fullWidth?: boolean;
fullWidthInput?: boolean;
helperText?: React.ReactNode;
InputLabelProps?: object;
InputProps?: object;
inputRef?: (...args: any[]) => any;
inputRef?: (ref: React.Ref<HTMLInputElement>) => any;
label?: React.ReactNode;
newChipKeyCodes?: number[];
onAdd?: (...args: any[]) => any;
onBeforeAdd?: (...args: any[]) => any;
onChange?: (...args: any[]) => any;
onDelete?: (...args: any[]) => any;
onUpdateInput?: (...args: any[]) => any;
onAdd?: (chip: string) => any;
onBeforeAdd?: (chip: string) => boolean;
onChange?: (chips: string[]) => any;
onDelete?: (chip:string, index: number) => any;
onUpdateInput?: React.EventHandler<any>
placeholder?: string;
value?: any[];
error?: boolean;
Expand Down

0 comments on commit 64c8c56

Please sign in to comment.