Socket
Socket
Sign inDemoInstall

react-native-date-picker

Package Overview
Dependencies
Maintainers
1
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.2.3 to 4.2.4

2

package.json
{
"name": "react-native-date-picker",
"version": "4.2.3",
"version": "4.2.4",
"description": "A datetime picker for React Native. In-modal or inlined. Supports Android and iOS.",

@@ -5,0 +5,0 @@ "main": "src/index.js",

import React from 'react'
import { Platform } from 'react-native'
import { Platform, Appearance } from 'react-native'
import DatePickerIOS from './DatePickerIOS'

@@ -22,3 +22,4 @@ import DatePickerAndroid from './DatePickerAndroid'

{...props}
textColor={colorToHex(props.textColor)}
textColor={colorToHex(getTextColor(props))}
theme={getTheme(props)}
fadeToColor={colorToHex(props.fadeToColor)}

@@ -35,2 +36,15 @@ title={getTitle(props)}

const getTheme = (props) => {
if (props.theme) return props.theme
if (!Appearance) return 'auto'
return Appearance.getColorScheme()
}
const getTextColor = (props) => {
if (props.textColor) return props.textColor
const darkTheme = getTheme(props) === 'dark'
if (darkTheme) return 'white'
return undefined
}
const getAndroidVariant = (props) => {

@@ -37,0 +51,0 @@ const { modal, androidVariant } = props

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc