Skip to content

Commit f1a3078

Browse files
committed
chore: update readme
1 parent 4b77efc commit f1a3078

File tree

3 files changed

+29
-271
lines changed

3 files changed

+29
-271
lines changed

CODE_OF_CONDUCT.md

Lines changed: 0 additions & 133 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 0 additions & 124 deletions
This file was deleted.

README.md

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)