Skip to content

Commit

Permalink
fix(Input|Button|TextArea): add focus method to typings (#1972)
Browse files Browse the repository at this point in the history
* fix(Input): add `focus` method to typings

* fix(Button|TextArea): add `focus` method to typings
  • Loading branch information
layershifter authored and levithomason committed Aug 20, 2017
1 parent d2fe58c commit af1f05d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/addons/TextArea/TextArea.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export interface TextAreaOnChangeData extends TextAreaProps {
value?: string;
}

declare const TextArea: React.ComponentClass<TextAreaProps>;
declare class TextArea extends React.Component<TextArea, {}> {
focus: () => void;
}

export default TextArea;
12 changes: 6 additions & 6 deletions src/elements/Button/Button.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ export interface ButtonProps {
toggle?: boolean;
}

interface ButtonComponent extends React.ComponentClass<ButtonProps> {
Content: typeof ButtonContent;
Group: typeof ButtonGroup;
Or: typeof ButtonOr;
}
declare class Button extends React.Component<ButtonProps, {}> {
static Content: typeof ButtonContent;
static Group: typeof ButtonGroup;
static Or: typeof ButtonOr;

declare const Button: ButtonComponent;
focus: () => void;
}

export default Button;
4 changes: 3 additions & 1 deletion src/elements/Input/Input.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ export interface InputOnChangeData extends InputProps {
value: string;
}

declare const Input: React.ComponentClass<InputProps>;
declare class Input extends React.Component<InputProps, {}> {
focus: () => void;
}

export default Input;

0 comments on commit af1f05d

Please sign in to comment.