Skip to content

Commit

Permalink
Update exports 🤦‍♀️ (#743)
Browse files Browse the repository at this point in the history
Forgot to export all consts moved to device-selector yesterday.. I really hope we can rewrite and update this service entirely sometime soon..
  • Loading branch information
ltatarev authored Jul 28, 2022
1 parent e60961b commit 6e5266c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
22 changes: 12 additions & 10 deletions const.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
const { Platform, StatusBar } = require('react-native');
const {
NAVIGATION_BAR_HEIGHT,
import { Platform, StatusBar } from 'react-native';
import {
IPHONE_12_LONG_SIDE,
IPHONE_12_MAX_LONG_SIDE,
IPHONE_X_HOME_INDICATOR_PADDING,
IPHONE_X_LONG_SIDE,
IPHONE_X_NOTCH_PADDING,
IPHONE_XR_LONG_SIDE,
IPHONE_12_LONG_SIDE,
IPHONE_12_MAX_LONG_SIDE,
NAVIGATION_HEADER_HEIGHT,
IPHONE_XR_NOTCH_PADDING,
} = require('./helpers');
NAVIGATION_BAR_HEIGHT,
NAVIGATION_HEADER_HEIGHT,
} from './helpers';

const STATUS_BAR_OFFSET =
Platform.OS === 'android' ? -StatusBar.currentHeight : 0;

module.exports = {
// TODO: Deprecate and remove exports from here
// Currently leaving for backwards compatibility
export {
IPHONE_12_LONG_SIDE,
IPHONE_12_MAX_LONG_SIDE,
IPHONE_X_HOME_INDICATOR_PADDING,
IPHONE_X_LONG_SIDE,
IPHONE_X_NOTCH_PADDING,
IPHONE_XR_LONG_SIDE,
IPHONE_XR_NOTCH_PADDING,
IPHONE_12_LONG_SIDE,
IPHONE_12_MAX_LONG_SIDE,
NAVIGATION_BAR_HEIGHT,
NAVIGATION_HEADER_HEIGHT,
STATUS_BAR_OFFSET,
Expand Down
13 changes: 12 additions & 1 deletion helpers/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
export { Device } from './device-selector';
export {
Device,
IPHONE_12_LONG_SIDE,
IPHONE_12_MAX_LONG_SIDE,
IPHONE_X_HOME_INDICATOR_PADDING,
IPHONE_X_LONG_SIDE,
IPHONE_X_NOTCH_PADDING,
IPHONE_XR_LONG_SIDE,
IPHONE_XR_NOTCH_PADDING,
NAVIGATION_BAR_HEIGHT,
NAVIGATION_HEADER_HEIGHT,
} from './device-selector';
export { calculateKeyboardOffset, default as Keyboard } from './keyboard';

0 comments on commit 6e5266c

Please sign in to comment.