react-native-screen-percent

1.0.2 • Public • Published

react-native-screen-percent

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

Instalation

npm i react-native-screen-percent

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!

Package Sidebar

Install

npm i react-native-screen-percent

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

2.51 kB

Total Files

4

Last publish

Collaborators

  • julianbonomini