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

What does the "size" prop do? #123

Open
mmbrtstd opened this issue Feb 27, 2020 · 1 comment
Open

What does the "size" prop do? #123

mmbrtstd opened this issue Feb 27, 2020 · 1 comment

Comments

@mmbrtstd
Copy link

I'm having a hard time figuring out what does the "size" prop do. There is no documentation about it and in the code I can't seem to figure out what it does.

@jimmythecode
Copy link

It appears to change the width by an increment of 9px (or thereabout). It's a bit confusing, as the default behaviour is for the width of the input to be 200.988px. The component won't shrink with it's container (which I feel would make more sense, intuitively?), so you have to set the size after you'd decided on the container size - as I understand.

Here's a codesandbox demo:
https://codesandbox.io/s/react-numeric-input-9frhm?file=/src/App.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants