Skip to content

Commit

Permalink
Merge pull request #12 from carl0smat3us/fix/otpinput-documentation-c…
Browse files Browse the repository at this point in the history
…onsistency

Documentation and Naming Consistency Fixes
  • Loading branch information
anday013 committed Oct 6, 2023
2 parents d661379 + a6ba43d commit a86702f
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ yarn add react-native-otp-entry

## Usage

1. Import the `OTPInput` component from `react-native-otp-entry`:
1. Import the `OtpInput` component from `react-native-otp-entry`:

```javascript
import { OTPInput } from "react-native-otp-entry";
import { OtpInput } from "react-native-otp-entry";
```

2. Render the `OTPInputView` component in your screen/component:
2. Render the `OtpInput` component in your screen/component:

```jsx
<OtpInput numberOfDigits={6} onTextChange={(text) => console.log(text)} />
Expand All @@ -45,16 +45,18 @@ yarn add react-native-otp-entry
3. Customize the styling as per your requirements:

```javascript
<OTPInput
<OtpInput
numberOfDigits={6}
focusColor="green"
onTextChange={(text) => console.log(text)}
containerStyle={styles.container}
inputsContainerStyle={styles.inputsContainer}
pinCodeContainerStyle={styles.pinCodeContainer}
pinCodeTextStyle={styles.pinCodeText}
focusStickStyle={styles.focusStick}
focusStickBlinkingDuration={500}
onTextChange={(text) => console.log(text)}
theme={{
containerStyle={styles.container},
inputsContainerStyle={styles.inputsContainer},
pinCodeContainerStyle={styles.pinCodeContainer},
pinCodeTextStyle={styles.pinCodeText},
focusStickStyle={styles.focusStick}
}}
/>
```

Expand Down

0 comments on commit a86702f

Please sign in to comment.