11import React , { Component } from 'react' ;
22import { StyleSheet , View , Dimensions , Image , Text , Platform } from 'react-native' ;
33import Interactable from 'react-native-interactable' ;
4+ import Screen from '../Screen'
45
5- const Screen = {
6- width : 480 ,
7- height : Dimensions . get ( 'window' ) . height - 75
8- }
6+ let height = Screen . height - 75
97
108export default class NotifPanel extends Component {
119 render ( ) {
@@ -21,16 +19,16 @@ export default class NotifPanel extends Component {
2119 < View style = { styles . panelContainer } >
2220 < Interactable . View
2321 verticalOnly = { true }
24- snapPoints = { [ { y : 0 , tension : 0 , damping : 1 } , { y : - Screen . height + 80 } ] }
25- gravityPoints = { [ { y : 0 , strength : 220 , falloff : Screen . height * 8 , damping : 0.7 , influenceArea : { top : ( - Screen . height + 80 ) * 0.5 } } ] }
26- initialPosition = { { y : - Screen . height + 80 } }
27- boundaries = { { top : - Screen . height , bottom : 0 , bounce : 2 , haptics : true } } >
22+ snapPoints = { [ { y : 0 , tension : 0 , damping : 1 } , { y : - height + 80 } ] }
23+ gravityPoints = { [ { y : 0 , strength : 220 , falloff : height * 8 , damping : 0.7 , influenceArea : { top : ( - height + 80 ) * 0.5 } } ] }
24+ initialPosition = { { y : - height + 80 } }
25+ boundaries = { { top : - height , bottom : 0 , bounce : 2 , haptics : true } } >
2826 < View style = { styles . panel } >
2927 < Text style = { styles . panelHeader } > Today</ Text >
3028 < Notification title = 'First Notification' body = 'This is the body of the first notification' />
3129 < Notification title = 'Second Notification' body = 'This is the body of the 2nd notification' />
3230 < Notification title = 'Third Notification' body = 'This is the body of the 3rd notification' />
33- { Screen . height <= 500 - 75 ? false :
31+ { height <= 500 - 75 ? false :
3432 < View >
3533 < Text style = { styles . panelHeader } > Yesterday</ Text >
3634 < Notification title = 'Fourth Notification' body = 'This is the body of the 4th notification' />
@@ -78,7 +76,7 @@ const styles = StyleSheet.create({
7876 right : 0
7977 } ,
8078 panel : {
81- height : Screen . height + 2 ,
79+ height : height + 2 ,
8280 backgroundColor : '#182e43f0' ,
8381 padding : 15 ,
8482 paddingTop : 30 ,
0 commit comments