Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ankipro/react-native-window-resize

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ankipro/react-native-window-resize

React Native window resizer for iOS

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@ankipro/react-native-window-resize

React Native library to resize app window on iOS. This library is mainly needed to quickly change the screen resolution by simulating different devices without having to open several simulators to test different resolution-dependent functions on the same device.

example

Installation

yarn add @ankipro/react-native-window-resize

install pods

npx pod-install

Usage

import WindowResizer from '@ankipro/react-native-window-resize';

// ...

WindowResizer.resizeToDefault();

WindowResizer.resizeTo(deviceModel);

WindowResizer.getAvailableDeviceModels((deviceModels) => ...)

For more information see example.

Methods

NameTypeDescription
.getAvailableDeviceModels()onComplete: (deviceModels: Array<DeviceModel>) => voidGet a list of device dimensions that are smaller than the current device
.resizeTo()(deviceModelName: string) => voidResize to 'deviceModelName' device
.resizeToDefault()() => voidReset to initial window size

Types

type DeviceModel = {
  name: string;
  width: number;
  height: number;
};

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Keywords

FAQs

Package last updated on 11 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc