Skip to content

Commit

Permalink
DatePickerIOS
Browse files Browse the repository at this point in the history
  • Loading branch information
henninghall committed May 24, 2024
1 parent e5af811 commit 7ca3559
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/DatePickerIOS.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { getNativeComponent } from './modules'
const NativeComponent = getNativeComponent()

/** @type {React.FC<PlatformPickerProps>} */
const DatePickerIOS = (props) => {
export const DatePickerIOS = (props) => {
const onChange = useCallback(
/** @param {{ nativeEvent: { timestamp: string } }} event */
(event) => {
Expand Down Expand Up @@ -51,5 +51,3 @@ const styles = StyleSheet.create({
width: 310,
},
})

export default DatePickerIOS
5 changes: 2 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
* @typedef {Omit<Props, "timeZoneOffsetInMinutes"> & { timeZoneOffsetInMinutes: string, textColor: string | undefined, onDateStringChange?: (date: string) => void }} PlatformPickerProps
*/
import React from 'react'
import { Appearance, Platform } from 'react-native'
import { Appearance, Platform, Text } from 'react-native'
import { colorToHex } from './colorToHex'
import { throwIfInvalidProps } from './propChecker'
import { Text } from 'react-native'

/** @type {React.FC<PlatformPickerProps>} */
const DatePicker = Platform.select({
android: () => require('./DatePickerAndroid').DatePickerAndroid,
// ios: () => require('./DatePickerIOS').default,
ios: () => require('./DatePickerIOS').DatePickerIOS,
default: () => () =>
<Text>DatePicker is not supported on this platform.</Text>,
})()
Expand Down

0 comments on commit 7ca3559

Please sign in to comment.