Skip to content

Commit da5ea66

Browse files
committed
Fix warning presentationStyle, changed conditional
1 parent ab27289 commit da5ea66

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Date/DatePickerInput.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ import { useLatest } from '../utils'
66
import type { DatePickerInputProps } from './DatePickerInput.shared'
77
import DatePickerInputWithoutModal from './DatePickerInputWithoutModal'
88
import { StyleProp, ViewStyle } from 'react-native'
9-
import { Platform } from 'react-native'
109

1110
function DatePickerInput(
1211
{
1312
withModal = true,
1413
calendarIcon = 'calendar',
1514
animationType = 'slide',
16-
presentationStyle = Platform.OS === 'ios' ? 'fullScreen' : 'pageSheet',
15+
presentationStyle = 'fullScreen',
1716
...rest
1817
}: DatePickerInputProps,
1918
ref: any

src/Date/DatePickerModal.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ export function DatePickerModal(
6666
default: 'slide',
6767
})
6868

69-
const isTransparent = presentationStyle === 'pageSheet' ? false : true
69+
const isTransparent =
70+
presentationStyle === 'pageSheet' || presentationStyle === 'fullScreen'
71+
? false
72+
: true
7073
const headerBackgroundColor = useHeaderBackgroundColor()
7174
const insets = useSafeAreaInsets()
7275

0 commit comments

Comments
 (0)