File tree Expand file tree Collapse file tree 3 files changed +29
-271
lines changed
Expand file tree Collapse file tree 3 files changed +29
-271
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -10,24 +10,39 @@ npm install react-native-input-code-otp
1010
1111## Usage
1212
13-
14- ``` js
15- import { multiply } from ' react-native-input-code-otp' ;
16-
17- // ...
18-
19- const result = await multiply (3 , 7 );
13+ ``` ts
14+ import {
15+ TextInputOTP ,
16+ TextInputOTPSlot ,
17+ TextInputOTPGroup ,
18+ TextInputOTPSeparator ,
19+ } from ' react-native-input-code-otp' ;
20+
21+ export function MyComponent() {
22+ return (
23+ < TextInputOTP maxLength = {6 } onFilled = {(code) => console.log(code)}>
24+ <TextInputOTPGroup >
25+ < TextInputOTPSlot index = {0 } / >
26+ < TextInputOTPSlot index = {1 } / >
27+ < TextInputOTPSlot index = {2 } / >
28+ < / TextInputOTPGroup >
29+ < TextInputOTPSeparator / >
30+ <TextInputOTPGroup >
31+ < TextInputOTPSlot index = {3 } / >
32+ < TextInputOTPSlot index = {4 } / >
33+ < TextInputOTPSlot index = {5 } / >
34+ < / TextInputOTPGroup >
35+ < / TextInputOTP >
36+ )
37+ }
2038```
2139
22-
2340## Contributing
2441
25- See the [ contributing guide ] ( CONTRIBUTING.md ) to learn how to contribute to the repository and the development workflow .
42+ Contributions are welcome! Please feel free to open issues or submit pull requests .
2643
27- ## License
28-
29- MIT
44+ If you find a bug or have any feature requests, please open an issue :)
3045
31- ---
46+ ## License
3247
33- Made with [ create-react-native-library ] ( https://github.com/callstack/react-native-builder-bob )
48+ This project is licensed under the MIT License.
You can’t perform that action at this time.
0 commit comments