@@ -6,13 +6,13 @@ import {
66 useWindowDimensions ,
77 View ,
88 Platform ,
9- StatusBar
9+ StatusBar ,
1010} from 'react-native'
1111import { useTheme } from 'react-native-paper'
1212import DatePickerModalContent , {
1313 DatePickerModalContentMultiProps ,
1414 DatePickerModalContentRangeProps ,
15- DatePickerModalContentSingleProps
15+ DatePickerModalContentSingleProps ,
1616} from './DatePickerModalContent'
1717import { useHeaderBackgroundColor , useHeaderColorIsLight } from '../utils'
1818import { useSafeAreaInsets } from 'react-native-safe-area-context'
@@ -23,7 +23,11 @@ interface DatePickerModalProps {
2323 disableStatusBar ?: boolean
2424 disableStatusBarPadding ?: boolean
2525 inputEnabled ?: boolean
26- presentationStyle ?: 'fullScreen' | 'pageSheet' | 'formSheet' | 'overFullScreen'
26+ presentationStyle ?:
27+ | 'fullScreen'
28+ | 'pageSheet'
29+ | 'formSheet'
30+ | 'overFullScreen'
2731}
2832
2933export interface DatePickerModalSingleProps
@@ -59,7 +63,7 @@ export function DatePickerModal(
5963 animationType ||
6064 Platform . select ( {
6165 web : 'none' ,
62- default : 'slide'
66+ default : 'slide' ,
6367 } )
6468
6569 const isLight = useHeaderColorIsLight ( )
@@ -84,16 +88,19 @@ export function DatePickerModal(
8488 style = { [
8589 StyleSheet . absoluteFill ,
8690 styles . modalBackground ,
87- { backgroundColor : theme . colors . backdrop }
91+ { backgroundColor : theme . colors . backdrop } ,
8892 ] }
8993 />
9094 </ TouchableWithoutFeedback >
91- < View style = { [ StyleSheet . absoluteFill , styles . modalRoot ] } pointerEvents = "box-none" >
95+ < View
96+ style = { [ StyleSheet . absoluteFill , styles . modalRoot ] }
97+ pointerEvents = "box-none"
98+ >
9299 < View
93100 style = { [
94101 styles . modalContent ,
95102 { backgroundColor : theme . colors . surface } ,
96- dimensions . width > 650 ? styles . modalContentBig : null
103+ dimensions . width > 650 ? styles . modalContentBig : null ,
97104 ] }
98105 >
99106 { disableStatusBar ? null : (
@@ -107,8 +114,8 @@ export function DatePickerModal(
107114 style = { [
108115 {
109116 height : insets . top ,
110- backgroundColor : headerBackgroundColor
111- }
117+ backgroundColor : headerBackgroundColor ,
118+ } ,
112119 ] }
113120 />
114121 ) }
@@ -130,29 +137,29 @@ const supportedOrientations: any = [
130137 'portrait-upside-down' ,
131138 'landscape' ,
132139 'landscape-left' ,
133- 'landscape-right'
140+ 'landscape-right' ,
134141]
135142
136143const styles = StyleSheet . create ( {
137144 modalRoot : {
138145 justifyContent : 'center' ,
139146 alignItems : 'center' ,
140- flex : 1
147+ flex : 1 ,
141148 } ,
142149 modalBackground : {
143- flex : 1
150+ flex : 1 ,
144151 } ,
145152 modalContent : {
146153 flex : 1 ,
147- width : '100%'
154+ width : '100%' ,
148155 } ,
149156 modalContentBig : {
150157 maxWidth : 600 ,
151158 maxHeight : 800 ,
152159 borderRadius : 10 ,
153160 width : '100%' ,
154- overflow : 'hidden'
155- }
161+ overflow : 'hidden' ,
162+ } ,
156163} )
157164
158165export default React . memo ( DatePickerModal )
0 commit comments