Skip to content

Commit

Permalink
Fix warning presentationStyle, changed conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
SoyDiego committed Nov 10, 2023
1 parent ab27289 commit da5ea66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/Date/DatePickerInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ import { useLatest } from '../utils'
import type { DatePickerInputProps } from './DatePickerInput.shared'
import DatePickerInputWithoutModal from './DatePickerInputWithoutModal'
import { StyleProp, ViewStyle } from 'react-native'
import { Platform } from 'react-native'

function DatePickerInput(
{
withModal = true,
calendarIcon = 'calendar',
animationType = 'slide',
presentationStyle = Platform.OS === 'ios' ? 'fullScreen' : 'pageSheet',
presentationStyle = 'fullScreen',
...rest
}: DatePickerInputProps,
ref: any
Expand Down
5 changes: 4 additions & 1 deletion src/Date/DatePickerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ export function DatePickerModal(
default: 'slide',
})

const isTransparent = presentationStyle === 'pageSheet' ? false : true
const isTransparent =
presentationStyle === 'pageSheet' || presentationStyle === 'fullScreen'
? false
: true
const headerBackgroundColor = useHeaderBackgroundColor()
const insets = useSafeAreaInsets()

Expand Down

0 comments on commit da5ea66

Please sign in to comment.