Skip to content

Commit

Permalink
feat: add inputClassName prop
Browse files Browse the repository at this point in the history
  • Loading branch information
sharvit committed Aug 25, 2020
1 parent 35630ba commit 14bc5f4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ online example: http://react-component.github.io/input-number/examples/
<td>rc-input-number</td>
<td>Specifies the class prefix</td>
</tr>
<tr>
<td>inputClassName</td>
<td>string</td>
<td></td>
<td>Specifies the class of the html input field</td>
</tr>
<tr>
<td>min</td>
<td>Number</td>
Expand Down
3 changes: 2 additions & 1 deletion src/InputNumber.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,7 @@ class InputNumber extends React.Component<Partial<InputNumberProps>, InputNumber
upHandler,
downHandler,
className,
inputClassName,
max,
min,
style,
Expand Down Expand Up @@ -814,7 +815,7 @@ class InputNumber extends React.Component<Partial<InputNumberProps>, InputNumber
onPaste={onPaste}
onClick={onClick}
onMouseUp={this.onMouseUp}
className={`${prefixCls}-input`}
className={`${prefixCls}-input ${inputClassName}`}
tabIndex={tabIndex}
autoComplete={autoComplete}
onFocus={this.onFocus}
Expand Down
1 change: 1 addition & 0 deletions src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface InputNumberProps {
prefixCls?: string;
style: React.CSSProperties;
className?: string;
inputClassName?: string;
onKeyUp: (e, ...arg) => void;
onKeyDown: (e, ...arg) => void;
onMouseUp: (...arg) => void;
Expand Down

0 comments on commit 14bc5f4

Please sign in to comment.