react-native-scaling-utils

1.0.0 • Public • Published

react-native-scaling-utils

package version package downloads standard-readme compliant package license make a pull request

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

  1. Fork it and create your feature branch: git checkout -b my-new-feature
  2. Commit your changes: git commit -am "Add some feature"
  3. Push to the branch: git push origin my-new-feature
  4. Submit a pull request

License

MIT

Package Sidebar

Install

npm i react-native-scaling-utils

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

5.69 kB

Total Files

7

Last publish

Collaborators

  • tiaanduplessis