Skip to content

Commit ee0e360

Browse files
committed
Checked Icon visibility bug for checked and unchecked logic is integrated
1 parent aad7933 commit ee0e360

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

lib/BouncyCheckbox.style.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export const _iconContainer = (
2222
borderRadius,
2323
alignItems: "center",
2424
justifyContent: "center",
25+
display: checked ? "flex" : "none",
2526
backgroundColor: checked ? fillColor : unfillColor,
2627
};
2728
};
@@ -44,9 +45,11 @@ export const _textStyle = (
4445
export const _iconImageStyle = (
4546
checkImageWidth: number,
4647
checkImageHeight: number,
48+
checked: boolean,
4749
): ImageStyle => ({
4850
width: checkImageWidth,
4951
height: checkImageHeight,
52+
display: checked ? "flex" : "none",
5053
});
5154

5255
export default StyleSheet.create<Style>({

lib/BouncyCheckbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class BouncyCheckbox extends React.Component<IBouncyCheckboxProps, IState> {
111111
{iconComponent || (
112112
<ImageComponent
113113
source={checkImageSource}
114-
style={_iconImageStyle(checkImageWidth, checkImageHeight)}
114+
style={_iconImageStyle(checkImageWidth, checkImageHeight, checked)}
115115
/>
116116
)}
117117
</Animated.View>

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

0 commit comments

Comments
 (0)