UNPKG

@brightlayer-ui/react-native-auth-workflow

Version:

Re-usable workflow components for Authentication and Registration within Eaton applications.

20 lines (19 loc) 440 B
/** * @packageDocumentation * @module Hooks * @internal */ import { Dimensions } from 'react-native'; /** * Hook used to identify whether an app is run on a tablet and to get the app window's width and height. * * @category Hook */ export const useScreenDimensions = () => { const { height, width } = Dimensions.get('screen'); return { isTablet: width >= 768, width: width, height: height, }; };