1.0.0 • Published 5 years ago
react-native-scaling-utils v1.0.0
react-native-scaling-utils
Simple scaling utilities for React Native
Table of Contents
Install
This project uses node and npm.
$ npm install react-native-scaling-utils
$ # OR
$ yarn add react-native-scaling-utils
Usage
import {
screenHeight,
screenWidth,
scale,
isPortrait,
isLandscape,
removeDimensionsListener
} from 'react-native-scaling-utils'
console.log(screenHeight)
console.log(screenWidth)
console.log(scale.font(10))
console.log(scale.height(10)) // 10%
console.log(scale.width(50)) // 50%
console.log(isPortrait)
console.log(isLandscape)
removeDimensionsListener()
Contribute
- Fork it and create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am "Add some feature"
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
License
MIT
1.0.0
5 years ago