Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #420 #421

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 31 additions & 25 deletions src/Date/DatePickerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
useWindowDimensions,
View,
Platform,
Dimensions,
} from 'react-native'
import { useTheme } from 'react-native-paper'
import DatePickerModalContent, {
Expand Down Expand Up @@ -75,33 +76,35 @@
supportedOrientations={supportedOrientations}
statusBarTranslucent={true}
>
<TouchableWithoutFeedback onPress={rest.onDismiss}>
<View
style={[
StyleSheet.absoluteFill,
sharedStyles.root,
{ backgroundColor: theme.colors.backdrop },
]}
/>
</TouchableWithoutFeedback>
<View
style={[StyleSheet.absoluteFill, styles.modalRoot]}
pointerEvents="box-none"
>
<View style={styles.modal}>
<TouchableWithoutFeedback onPress={rest.onDismiss}>
<View
style={[
StyleSheet.absoluteFill,
sharedStyles.root,
{ backgroundColor: theme.colors.backdrop },
]}
/>
</TouchableWithoutFeedback>
<View
style={[
styles.modalContent,
{ backgroundColor: theme.colors.surface },
dimensions.width > 650 ? styles.modalContentBig : null,
]}
style={[StyleSheet.absoluteFill, styles.modalRoot]}
pointerEvents="box-none"
>
<DatePickerModalContent
{...rest}
inputEnabled={inputEnabled}
disableSafeTop={disableStatusBarPadding}
disableStatusBar={disableStatusBar}
statusBarOnTopOfBackdrop={isPageSheet || statusBarOnTopOfBackdrop}
/>
<View
style={[
styles.modalContent,
{ backgroundColor: theme.colors.surface },
dimensions.width > 650 ? styles.modalContentBig : null,
]}
>
<DatePickerModalContent
{...rest}
inputEnabled={inputEnabled}
disableSafeTop={disableStatusBarPadding}
disableStatusBar={disableStatusBar}
statusBarOnTopOfBackdrop={isPageSheet || statusBarOnTopOfBackdrop}

Check failure on line 105 in src/Date/DatePickerModal.tsx

View workflow job for this annotation

GitHub Actions / lint

Replace `isPageSheet·||·statusBarOnTopOfBackdrop` with `⏎··················isPageSheet·||·statusBarOnTopOfBackdrop⏎················`
/>
</View>
</View>
</View>
</Modal>
Expand All @@ -110,6 +113,9 @@
}

const styles = StyleSheet.create({
modal: {
height: Dimensions.get('screen').height

Check failure on line 117 in src/Date/DatePickerModal.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `,`
},
modalContent: {
flex: 1,
width: '100%',
Expand Down
Loading