0.0.4 • Published 2 years ago
react-native-resize v0.0.4
React Native
A Lib React Native to get the real dimensions.
This library was developed to solve a simple problem that generates a big headache. 👌
Installation
npm install react-native-resize
# or
yarn add react-native-resize
Example
import { widthResize, heightResize } from "react-native-resize";
import { Image } from "react-native";
<Image
source={{ uri: 'https://example_url_image.com.br' }}
width={widthResize(200)}
height={heightResize(200)}
/>
Methods
arguments | Description | |
---|---|---|
widthResize | value: string | The width will be calculated based on the pixel ratio of each device |
heightResize | value: string | A altura será calculada com base no pixel ratio de cada dispositivo |
fontResize | value: string | Resizes font for responsiveness based on device aspect ratio |
Author
Jônatas Alves
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflo
License
MIT