react-native-calendars-ts
Advanced tools
Comparing version 1.23.1 to 1.23.2
{ | ||
"name": "react-native-calendars-ts", | ||
"version": "1.23.1", | ||
"version": "1.23.2", | ||
"main": "src/index.js", | ||
@@ -5,0 +5,0 @@ "description": "React Native Calendar Components", |
import React, {Component} from 'react'; | ||
import {ActivityIndicator} from 'react-native'; | ||
import { TouchableOpacity as TouchableOpacityAndroid } from 'react-native-gesture-handler' | ||
import {View, Text, Image, TouchableOpacity, Platform} from 'react-native'; | ||
import {TouchableOpacity as TouchableOpacityAndroid} from 'react-native-gesture-handler'; | ||
import {View, Text, Image, TouchableOpacity, Platform} from 'react-native'; | ||
import XDate from 'xdate'; | ||
@@ -45,2 +45,3 @@ import PropTypes from 'prop-types'; | ||
const disabled = this.state.onPressDisabled || this.props.disabled; | ||
return ( | ||
@@ -50,4 +51,7 @@ <WrappedComponent | ||
disabled={disabled} | ||
style={[this.props.style, disabled && {opacity: 0.2}]} | ||
onPress={this.onPress} | ||
style={{ | ||
...this.props.style, | ||
opacity: disabled ? 0.2 : 1, | ||
}} | ||
/> | ||
@@ -64,3 +68,3 @@ ); | ||
const Button = withPreventDoublePress(Platform.OS==='ios' ? TouchableOpacity :TouchableOpacityAndroid); | ||
const Button = withPreventDoublePress(TouchableOpacity); | ||
@@ -164,6 +168,3 @@ class CalendarHeader extends Component { | ||
onPress={this.onPressLeft} | ||
style={[ | ||
this.style.arrow, | ||
this.props.disableLeftArrow && {opacity: 0.2}, | ||
]} | ||
style={this.style.arrow} | ||
hitSlop={{left: 20, right: 20, top: 20, bottom: 20}} | ||
@@ -189,6 +190,3 @@ testID={ | ||
onPress={this.onPressRight} | ||
style={[ | ||
this.style.arrow, | ||
this.props.disableRightArrow && {opacity: 0.2}, | ||
]} | ||
style={this.style.arrow} | ||
hitSlop={{left: 20, right: 20, top: 20, bottom: 20}} | ||
@@ -195,0 +193,0 @@ testID={ |
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
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
176993
4415