Description
Use this lib to create pixel pirfect designs in web or react-native/native-script projects
Instalation
Installing from git:
npm i -S git+https://git@github.com/ingvardm/pixels2points.git#master yarn add git+https://git@github.com/ingvardm/pixels2points.git#master
Installing from npm:
Installing from bower:
Usage
Require and configure:
const pixels2points = const calcSize = pixels2pointscalculate // configure device and design width in pixelspixels2points console // 170.66666666666666
Use built in roundeing function to round output to nearest integer;
pixels2points console // rounded 171
Configure pixels2points to use custom middlewear function:
const myRoundingFunction = { return Math} pixels2points console // rounded down 170
Run with parameters:
var buttonWidth = console// responsive button width = 120
Development
Contributing
To contribute to this project follow these guidelines