Skip to content

Commit

Permalink
refactor: simplify TextArea's code
Browse files Browse the repository at this point in the history
  • Loading branch information
benjycui committed Jul 24, 2017
1 parent 499ab69 commit d2aca99
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/input/TextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ export default class TextArea extends React.Component<TextAreaProps & HTMLTextar
}

getTextAreaClassName() {
const { prefixCls, disabled } = this.props;
return classNames(prefixCls, {
const { prefixCls, className, disabled } = this.props;
return classNames(prefixCls, className, {
[`${prefixCls}-disabled`]: disabled,
});
}
Expand Down Expand Up @@ -125,7 +125,7 @@ export default class TextArea extends React.Component<TextAreaProps & HTMLTextar
return (
<textarea
{...otherProps}
className={classNames(this.getTextAreaClassName(), props.className)}
className={this.getTextAreaClassName()}
style={style}
onKeyDown={this.handleKeyDown}
onChange={this.handleTextareaChange}
Expand Down

0 comments on commit d2aca99

Please sign in to comment.