Skip to content

Commit

Permalink
Adding top padding ot prevent notch cut
Browse files Browse the repository at this point in the history
  • Loading branch information
danieltrizzuto committed Oct 15, 2020
1 parent de7f757 commit f8eb6e7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
17 changes: 9 additions & 8 deletions examples/components/Panel/Panel.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
import React, {Component} from 'react';
import {
StyleSheet,
ScrollView,
View,
TouchableHighlight,
TouchableWithoutFeedback,
Animated,
Dimensions,
PanResponder,
ScrollView,
StyleSheet,
TouchableHighlight,
TouchableWithoutFeedback,
View,
} from 'react-native';

import {Bar} from './Bar';
import {Close} from './Close';

let FULL_HEIGHT = Dimensions.get('window').height;
let NOTCH_PREVENTION = 14;

let FULL_HEIGHT = Dimensions.get('window').height - NOTCH_PREVENTION;
let FULL_WIDTH = Dimensions.get('window').width;
let PANEL_HEIGHT = FULL_HEIGHT - 100;
let PANEL_HEIGHT = FULL_HEIGHT - NOTCH_PREVENTION;

const STATUS = {
CLOSED: 0,
Expand Down
17 changes: 9 additions & 8 deletions src/Panel.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
import * as React from 'react';
import {
StyleSheet,
ScrollView,
View,
TouchableHighlight,
TouchableWithoutFeedback,
Animated,
Dimensions,
PanResponder,
ScrollView,
StyleSheet,
TouchableHighlight,
TouchableWithoutFeedback,
View,
} from 'react-native';

import { Bar } from './Bar';
import { Close } from './Close';

let FULL_HEIGHT = Dimensions.get('window').height;
let NOTCH_PREVENTION = 14;

let FULL_HEIGHT = Dimensions.get('window').height - NOTCH_PREVENTION;
let FULL_WIDTH = Dimensions.get('window').width;
let PANEL_HEIGHT = FULL_HEIGHT - 100;
let PANEL_HEIGHT = FULL_HEIGHT - NOTCH_PREVENTION;

const STATUS = {
CLOSED: 0,
Expand Down

0 comments on commit f8eb6e7

Please sign in to comment.