Skip to content

React native package to obtain, in pixels, a percentage of the screen

License

Notifications You must be signed in to change notification settings

julianbonomini/react-native-screen-percent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-screen-percent

React native package to obtain, in pixels, a percentage of the screen

Instalation

npm i react-native-screen-percent

No Dependencies!!!!

Usage

Import

import { wp, hp } from 'react-native-screen-percent'

And use it this way:

const styles = StyleSheet.create({
  button: {
    width: wp(80),
    height: hp(5)
  }
})

Enjoy!