expo-checkbox
Advanced tools
Comparing version 2.5.0 to 2.6.0
@@ -10,5 +10,5 @@ import React from 'react'; | ||
const { color, disabled, onChange, onValueChange, style, value, ...other } = this.props; | ||
return (React.createElement(Pressable, { ...other, disabled: disabled, | ||
// Announces "checked" status and "checkbox" as the focused element | ||
accessibilityRole: "checkbox", accessibilityState: { disabled, checked: value }, style: [ | ||
return (<Pressable {...other} disabled={disabled} | ||
// Announces "checked" status and "checkbox" as the focused element | ||
accessibilityRole="checkbox" accessibilityState={{ disabled, checked: value }} style={[ | ||
styles.root, | ||
@@ -20,5 +20,7 @@ style, | ||
value && disabled && styles.checkedAndDisabled, | ||
], onPress: this.handleChange }, value && (React.createElement(Image, { source: { | ||
uri: checkmarkBase64, | ||
}, style: StyleSheet.absoluteFill })))); | ||
]} onPress={this.handleChange}> | ||
{value && (<Image source={{ | ||
uri: checkmarkBase64, | ||
}} style={StyleSheet.absoluteFill}/>)} | ||
</Pressable>); | ||
} | ||
@@ -25,0 +27,0 @@ } |
@@ -22,3 +22,3 @@ /** | ||
const { color, disabled, onChange, onValueChange, style, value, ...other } = this.props; | ||
const fakeControl = (React.createElement(View, { pointerEvents: "none", style: [ | ||
const fakeControl = (<View pointerEvents="none" style={[ | ||
styles.fakeControl, | ||
@@ -30,3 +30,3 @@ value && styles.fakeControlChecked, | ||
value && disabled && styles.fakeControlCheckedAndDisabled, | ||
] })); | ||
]}/>); | ||
const nativeControl = createElement('input', { | ||
@@ -41,5 +41,6 @@ accessibilityChecked: value, | ||
}); | ||
return (React.createElement(View, { ...other, style: [styles.root, style, disabled && styles.cursorDefault] }, | ||
nativeControl, | ||
fakeControl)); | ||
return (<View {...other} style={[styles.root, style, disabled && styles.cursorDefault]}> | ||
{nativeControl} | ||
{fakeControl} | ||
</View>); | ||
} | ||
@@ -46,0 +47,0 @@ } |
@@ -13,2 +13,8 @@ # Changelog | ||
## 2.6.0 — 2023-10-17 | ||
### 💡 Others | ||
- Ship untranspiled JSX to support custom handling of `jsx` and `createElement`. ([#24889](https://github.com/expo/expo/pull/24889) by [@EvanBacon](https://github.com/EvanBacon)) | ||
## 2.5.0 — 2023-08-02 | ||
@@ -15,0 +21,0 @@ |
{ | ||
"name": "expo-checkbox", | ||
"version": "2.5.0", | ||
"version": "2.6.0", | ||
"description": "Basic checkbox for iOS, Android, and web", | ||
@@ -41,3 +41,3 @@ "main": "build/Checkbox.js", | ||
}, | ||
"gitHead": "2240630a92eb79a4e4bf73e1439916c394876478" | ||
"gitHead": "da25937e2a99661cbe5eb60ca1d8d6245fc96a50" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
47549
493
1