0.2.0 • Published 5 months ago

@nbottarini/react-native-relative-points v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

npm License: MIT CI Status

React Native relative points

Utility function that eases your responsive design

Installation

Npm:

$ npm install --save @nbottarini/react-native-relative-points

Yarn:

$ yarn add @nbottarini/react-native-relative-points

Usage

// Create a function named rv with your design width (for example the width used in Figma)
export const rv = (value) => relativeValueToPoints(value, 1440)

// Use your function to convert design units to proportional device units (the design proportions will be kept)
const MyComponent = () => (
    <View style={{ paddingTop: rv(14) }} />    
)
0.2.0

5 months ago

0.1.2

9 months ago

0.1.3

9 months ago

0.1.0

1 year ago