Skip to content

Commit 5366f82

Browse files
committed
New version 2.1.6 with typescript error fixes
1 parent fac2b66 commit 5366f82

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

.vscode/settings.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

lib/BouncyCheckbox.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ import {
77
Animated,
88
StyleProp,
99
ViewStyle,
10-
TouchableOpacity,
11-
TouchableOpacityProps,
1210
TextStyle,
11+
TouchableOpacity,
1312
} from "react-native";
1413
import styles, { _textStyle, _iconContainer } from "./BouncyCheckbox.style";
1514

1615
type CustomStyleProp = StyleProp<ViewStyle> | Array<StyleProp<ViewStyle>>;
1716

18-
export interface IBouncyCheckboxProps extends TouchableOpacityProps {
17+
export interface IBouncyCheckboxProps {
1918
style?: StyleProp<ViewStyle>;
2019
size?: number;
2120
text?: string;
@@ -35,7 +34,7 @@ export interface IBouncyCheckboxProps extends TouchableOpacityProps {
3534
checkIconImageSource?: Image;
3635
textContainerStyle?: CustomStyleProp;
3736
TouchableComponent?: any;
38-
onPress?: (isChecked?: boolean) => void;
37+
onPress?: (checked: boolean) => void;
3938
}
4039

4140
interface IState {
@@ -83,7 +82,7 @@ class BouncyCheckbox extends React.Component<IBouncyCheckboxProps, IState> {
8382
friction: bounceFriction,
8483
useNativeDriver,
8584
}).start();
86-
this.props.onPress && this.props.onPress();
85+
this.props.onPress && this.props.onPress(this.state.checked);
8786
}
8887
};
8988

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": "2.1.5",
3+
"version": "2.1.6",
44
"description": "Fully customizable animated bouncy checkbox for React Native",
55
"keywords": [
66
"bouncy",

0 commit comments

Comments
 (0)