We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey, a slight suggestion @marudy
If we could give the option, to provide the sizes that we get from our designs directly to the functions that would be better.
I have written like a code snippet, which would explain better.
import _ from 'lodash'; import { widthPercentageToDP, heightPercentageToDP } from 'react-native-responsive-screen'; const VIEWPORT_HEIGHT = 828; const VIEWPORT_WIDTH = 414; export const wp = (width: number): number => { const widthPercentage = (width / VIEWPORT_WIDTH) * 100; return _.ceil(widthPercentage); }; export const hp = (height: number): number => { const heightPercentage = (height / VIEWPORT_HEIGHT) * 100; return _.ceil(heightPercentage); };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey, a slight suggestion @marudy
If we could give the option, to provide the sizes that we get from our designs directly to the functions that would be better.
I have written like a code snippet, which would explain better.
The text was updated successfully, but these errors were encountered: