Skip to content

Commit a78ca37

Browse files
committed
chore: verison 4.1.1 with a useBuiltInState fix
1 parent 30798a2 commit a78ca37

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const [localChecked, setLocalChecked] = React.useState(false);
9191
disableText
9292
fillColor="green"
9393
size={50}
94-
useBuiltInState
94+
useBuiltInState={false}
9595
iconImageStyle={styles.iconImageStyle}
9696
iconStyle={{borderColor: 'green'}}
9797
onPress={(checked: boolean) => {

example/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ const App: React.FC = () => {
138138
disableText
139139
fillColor="green"
140140
size={50}
141-
useBuiltInState
141+
useBuiltInState={false}
142142
iconImageStyle={styles.iconImageStyle}
143143
iconStyle={{borderColor: 'green'}}
144144
onPress={(checked: boolean) => {

lib/BouncyCheckbox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const BouncyCheckbox: React.ForwardRefRenderFunction<
6060
}, [isChecked, setChecked]);
6161

6262
const onCheckboxPress = useCallback(() => {
63-
if (useBuiltInState) {
63+
if (!useBuiltInState) {
6464
syntheticBounceAnimation(
6565
bounceEffectIn,
6666
bounceEffectOut,
@@ -98,7 +98,7 @@ const BouncyCheckbox: React.ForwardRefRenderFunction<
9898
return;
9999
}
100100

101-
if (useBuiltInState) {
101+
if (!useBuiltInState) {
102102
onLongPress && onLongPress(isChecked ?? false);
103103
return;
104104
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-bouncy-checkbox",
3-
"version": "4.1.0",
3+
"version": "4.1.1",
44
"description": "Fully customizable animated bouncy checkbox for React Native",
55
"keywords": [
66
"toggle",

0 commit comments

Comments
 (0)