0.0.4 • Published 2 years ago

react-native-resize v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

React Native

A Lib React Native to get the real dimensions. Platform License

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

argumentsDescription
widthResizevalue: stringThe width will be calculated based on the pixel ratio of each device
heightResizevalue: stringA altura será calculada com base no pixel ratio de cada dispositivo
fontResizevalue: stringResizes 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