smh-react-native-responsive-screen
npm install smh-react-native-responsive-screensmh-react-native-responsive-screen
sh
Expo
npx expo install smh-react-native-responsive-screen#React Native
npm install --save smh-react-native-responsive-screen
`Examples
1. How to use with StyleSheet.create()
`js
import {widthPercentageToDP as wp, heightPercentageToDP as hp} from 'smh-react-native-responsive-screen';class Login extends Component {
render() {
return (
Login
);
}
}
const styles = StyleSheet.create({
container: { flex: 1 },
textWrapper: {
height: hp('70%'), // 70% of height device screen
width: wp('80%') // 80% of width device screen
},
myText: {
fontSize: hp('5%') // End result looks like the provided UI mockup
}
});
export default Login;
``Contribution are always welcome, no matter how large or small !
We want this community to be friendly and respectful to each other.Please follow it in all your interactions with the project.
Please feel free to drop me a mail S MUNI HARISH
Thanks to the authors of these libraries for inspiration
Inspired by react-native-responsive-screen
To keep this library maintained and up-to-date please consider sponsoring it on GitHub. Or if you are looking for a private support or help in customizing the experience, then reach out to me on Linkedin @smuniharish.
---
Made with ❤️