Skip to content

Commit

Permalink
fix: updated initial position to screen height (#657)
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhom committed Sep 23, 2021
1 parent f03b05b commit dc56417
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/bottomSheet/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
KEYBOARD_BEHAVIOR,
KEYBOARD_BLUR_BEHAVIOR,
KEYBOARD_INPUT_MODE,
WINDOW_HEIGHT,
SCREEN_HEIGHT,
} from '../../constants';

// default values
Expand All @@ -29,7 +29,7 @@ const INITIAL_CONTAINER_OFFSET = {
right: 0,
};
const INITIAL_HANDLE_HEIGHT = -999;
const INITIAL_POSITION = WINDOW_HEIGHT;
const INITIAL_POSITION = SCREEN_HEIGHT;

export {
DEFAULT_HANDLE_HEIGHT,
Expand Down
3 changes: 3 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Dimensions, Platform } from 'react-native';
import Animated, { Easing } from 'react-native-reanimated';

const { height: WINDOW_HEIGHT, width: WINDOW_WIDTH } = Dimensions.get('window');
const { height: SCREEN_HEIGHT, width: SCREEN_WIDTH } = Dimensions.get('screen');

enum GESTURE_SOURCE {
SCROLLABLE = 0,
Expand Down Expand Up @@ -123,6 +124,8 @@ export {
KEYBOARD_STATE,
WINDOW_HEIGHT,
WINDOW_WIDTH,
SCREEN_HEIGHT,
SCREEN_WIDTH,
SCROLLABLE_DECELERATION_RATE_MAPPER,
MODAL_STACK_BEHAVIOR,
KEYBOARD_BEHAVIOR,
Expand Down

0 comments on commit dc56417

Please sign in to comment.