-
Notifications
You must be signed in to change notification settings - Fork 75
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
using calcwidth #62
Comments
Use the calcWidth prop instead of the width prop |
example to do that? i am using it in a react native app and not sure what should be the value for this property |
Remove your width propety and use calcWidth. calcWidth is a property like width, but instead of taking in a number, it takes in a function that returns a number (the dynamically-generated width). Here's an example:
The input parameter is size (which comes with screenWidth and screenHeight) and the output parameter is the width; in this case, it's the smaller of screenWidth or screenHeight below maxWidth. |
Hi @willb335 @jeremywiedemeier @moblizeit |
Not sure this can work within a webview for react native. Sorry no mobile examples |
I guess Webview wont be a good option because we won't have any control over it, Thanks for replying though ! |
i am using react and it says use calcWidth for responsive board. but how exactly?
what should i replace width={400} with? width={calcWidth} does not work
The text was updated successfully, but these errors were encountered: