Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Reduce Gap Between Inputs #57

Closed
rick427 opened this issue May 13, 2024 · 4 comments · Fixed by #58
Closed

Cannot Reduce Gap Between Inputs #57

rick427 opened this issue May 13, 2024 · 4 comments · Fixed by #58
Labels
bug Something isn't working

Comments

@rick427
Copy link

rick427 commented May 13, 2024

Describe the bug
Setting a gap or margin on the containerStyle or pinCodeContainerStyle doesn't work.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
The spacing or gap between input elements should change based on the spacing provided

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: Mac
  • Device OS: Android
  • Device version: react native 0.73.7
  • Library version: 1.6.1

Additional context
Add any other context about the problem here.

@rick427 rick427 added the bug Something isn't working label May 13, 2024
@anday013
Copy link
Owner

anday013 commented May 13, 2024

@rick427 Hi, thank you for bringing up this issue! I'll fix it asap. As a temporary workaround you can use this combination if props to deal with it:

<OtpInput theme={{ inputsContainerStyle: { justifyContent: 'flex-start', }, pinCodeContainerStyle: { marginRight: 5 } }}/>

@rick427
Copy link
Author

rick427 commented May 26, 2024

Thanks

@anday013
Copy link
Owner

@rick427 Welcome! Could u please take a look at the PR I created #58 . The default width is 100% (I do not want to break the default behaviour for prev users), when you're setting gap, u need to set width to undefined or 'auto'. Is it acceptable solution, WDYT?
image

@rick427
Copy link
Author

rick427 commented May 28, 2024

Looks good

@rick427 rick427 closed this as completed May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants