Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Input|Button|TextArea): add focus method to typings #1972

Merged
merged 2 commits into from
Aug 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;