react-native-date-picker
Advanced tools
Comparing version 4.0.0-2 to 4.0.0-3
{ | ||
"name": "react-native-date-picker", | ||
"version": "4.0.0-2", | ||
"description": "A datetime picker for React Native. As modal or stand alone. Supports Android and iOS.", | ||
"version": "4.0.0-3", | ||
"description": "A datetime picker for React Native. In-modal or stand-alone. Supports Android and iOS.", | ||
"main": "src/index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -49,8 +49,3 @@ import React from 'react' | ||
if (props.open) { | ||
NativeModules.RNDatePicker.openPicker({ | ||
...props, | ||
confirmText: this.props.confirmText ?? 'Confirm', | ||
cancelText: this.props.cancelText ?? 'Cancel', | ||
androidVariant: this.props.androidVariant ?? 'nativeAndroid', | ||
}) | ||
NativeModules.RNDatePicker.openPicker(props) | ||
} | ||
@@ -57,0 +52,0 @@ return null |
@@ -25,9 +25,7 @@ import React from 'react' | ||
title={getTitle(props)} | ||
confirmText={props.confirmText ?? 'Confirm'} | ||
cancelText={props.cancelText ?? 'Cancel'} | ||
androidVariant={ | ||
props.androidVariant ?? props.modal ? 'nativeAndroid' : 'iosClone' | ||
} | ||
minuteInterval={props.minuteInterval ?? 1} | ||
mode={props.mode ?? 'datetime'} | ||
confirmText={props.confirmText ? props.confirmText : 'Confirm'} | ||
cancelText={props.cancelText ? props.cancelText : 'Cancel'} | ||
androidVariant={getAndroidVariant(props)} | ||
minuteInterval={props.minuteInterval ? props.minuteInterval : 1} | ||
mode={props.mode ? props.mode : 'datetime'} | ||
/> | ||
@@ -37,2 +35,8 @@ ) | ||
const getAndroidVariant = (props) => { | ||
const { modal, androidVariant } = props | ||
if (androidVariant) return androidVariant | ||
return modal ? 'nativeAndroid' : 'iosClone' | ||
} | ||
const getTitle = (props) => { | ||
@@ -39,0 +43,0 @@ const { title, mode } = props |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
152968195
2388
9578
1