Skip to content

Commit 057f64d

Browse files
committed
♻️ Naming
1 parent c768a3c commit 057f64d

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default class App extends Component {
7777
<td>Style applied to each input.</td>
7878
</tr>
7979
<tr>
80-
<td>inputFocusStyle</td>
80+
<td>focusStyle</td>
8181
<td>style (object)</td>
8282
<td>false</td>
8383
<td>none</td>
@@ -91,7 +91,7 @@ export default class App extends Component {
9191
<td>Disables all the inputs.</td>
9292
</tr>
9393
<tr>
94-
<td>inputDisabledStyle</td>
94+
<td>disabledStyle</td>
9595
<td>style (object)</td>
9696
<td>false</td>
9797
<td>none</td>

src/lib/index.jsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ type Props = {
1313
separator?: Object,
1414
containerStyle?: Object,
1515
inputStyle?: Object,
16-
inputFocusStyle?: Object,
16+
focusStyle?: Object,
1717
disabled?: boolean,
18-
inputDisabledStyle?: Object,
18+
disabledStyle?: Object,
1919
};
2020

2121
type State = {
@@ -56,8 +56,8 @@ class SingleOtpInput extends PureComponent<*> {
5656
inputStyle,
5757
focus,
5858
disabled,
59-
inputFocusStyle,
60-
inputDisabledStyle,
59+
focusStyle,
60+
disabledStyle,
6161
...rest
6262
} = this.props;
6363

@@ -67,8 +67,8 @@ class SingleOtpInput extends PureComponent<*> {
6767
style={Object.assign(
6868
{ width: '1em' },
6969
inputStyle,
70-
focus && inputFocusStyle,
71-
disabled && inputDisabledStyle
70+
focus && focusStyle,
71+
disabled && disabledStyle
7272
)}
7373
type="tel"
7474
maxLength="1"
@@ -195,10 +195,10 @@ class OtpInput extends Component<Props, State> {
195195
const {
196196
numInputs,
197197
inputStyle,
198-
inputFocusStyle,
198+
focusStyle,
199199
separator,
200200
disabled,
201-
inputDisabledStyle,
201+
disabledStyle,
202202
} = this.props;
203203
const inputs = [];
204204

@@ -219,10 +219,10 @@ class OtpInput extends Component<Props, State> {
219219
}}
220220
separator={separator}
221221
inputStyle={inputStyle}
222-
inputFocusStyle={inputFocusStyle}
222+
focusStyle={focusStyle}
223223
isLastChild={i === numInputs - 1}
224224
disabled={disabled}
225-
inputDisabledStyle={inputDisabledStyle}
225+
disabledStyle={disabledStyle}
226226
/>
227227
);
228228
}

0 commit comments

Comments
 (0)