Socket
Socket
Sign inDemoInstall

@logicwind/react-native-fold-detection

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@logicwind/react-native-fold-detection

The purpose of the package is to provide details regarding the Android folding capability.


Version published
Weekly downloads
6
decreased by-25%
Maintainers
2
Weekly downloads
 
Created
Source

react-native-fold-detection

The purpose of the package is to provide details regarding the Android folding capability.

Installation

npm install react-native-fold-detection

iOS

You'll need to disable auto-linking for this package. To do so, create react-native.config.js in the root of your project with this content:

module.exports = {
  dependencies: {
    "react-native-fold-detection": {
      platforms: {
        ios: null, // this will disable autolinking for this package on iOS
      },
    },
  },
};

In App.js Wrap your app with FoldingFeatureProvider

import * as React from "react";

import { FoldingFeatureProvider } from "react-native-fold-detection";
import SampleScreen from "./SampleScreen";

export default function App() {
  return (
    <FoldingFeatureProvider>
      <SampleScreen />
    </FoldingFeatureProvider>
  );
}

In other screens

import { useFoldingFeature } from "react-native-fold-detection";

const { layoutInfo, isTableTop, isBook, isFlat } = useFoldingFeature();

useFoldingFeature Props

PropTypeDefaultDescription
layoutInfoLayoutInfoFolding Feature from android doc
isTableTopbooleanfalseHALF_OPENED & HORIZONTAL
isBookbooleanfalseHALF_OPENED & VERTICAL
isFlatbooleantrue

License

MIT


Made with create-react-native-library

Keywords

FAQs

Package last updated on 06 Dec 2023

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