Skip to content

Commit bde1445

Browse files
committed
It's styling is changed
1 parent 2612e4a commit bde1445

File tree

4 files changed

+11
-38
lines changed

4 files changed

+11
-38
lines changed

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"react": "16.12.0",
1616
"react-native": "0.61.5",
1717
"react-native-bottom-search-bar": "0.1.1",
18-
"react-native-bouncy-checkbox": "0.1.2",
18+
"react-native-bouncy-checkbox": "0.2.0",
1919
"react-native-dynamic-vector-icons": "^0.2.1",
2020
"react-native-iphone-x-helper": "^1.2.1",
2121
"react-native-vector-icons": "^6.6.0"

lib/src/BouncyCheckbox.js

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,14 @@ class BouncyCheckbox extends Component {
4141
iconType,
4242
iconColor,
4343
fillColor,
44-
borderColor,
44+
iconStyle,
4545
unfillColor,
46-
checkboxSize,
47-
borderRadius,
48-
borderWidth,
4946
iconComponent,
5047
} = this.props;
5148
return (
5249
<Animated.View
5350
style={[
54-
_iconContainer(
55-
checkboxSize,
56-
checked,
57-
borderRadius,
58-
borderWidth,
59-
borderColor,
60-
fillColor,
61-
unfillColor
62-
),
51+
iconStyle || _iconContainer(checked, fillColor, unfillColor),
6352
{ transform: [{ scale: springValue }] },
6453
]}
6554
>
@@ -124,29 +113,21 @@ BouncyCheckbox.propTypes = {
124113
fillColor: PropTypes.string,
125114
fontFamily: PropTypes.string,
126115
unfillColor: PropTypes.string,
127-
borderColor: PropTypes.string,
128-
borderRadius: PropTypes.number,
129-
borderWidth: PropTypes.number,
130-
checkboxSize: PropTypes.number,
131116
useNativeDriver: PropTypes.bool,
132117
disableTextDecoration: PropTypes.bool,
133118
};
134119

135120
BouncyCheckbox.defaultProps = {
136121
fontSize: 16,
137122
iconSize: 15,
138-
checkboxSize: 25,
139123
isChecked: false,
140124
iconName: "check",
141125
iconType: "Entypo",
142126
textColor: "#757575",
143-
borderRadius: 25 / 2,
144-
borderWidth: 1,
145127
fillColor: "#ffc484",
146128
iconColor: "#fdfdfd",
147-
text: "Call my mom 😇",
148-
borderColor: "#ffc484",
149129
useNativeDriver: true,
130+
text: "Call my mom 😇",
150131
unfillColor: "transparent",
151132
disableTextDecoration: false,
152133
};

lib/src/BouncyCheckbox.style.js

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
1-
export const _iconContainer = (
2-
size,
3-
checked,
4-
borderRadius,
5-
borderColor,
6-
borderWidth,
7-
fillColor,
8-
unfillColor
9-
) => {
1+
export const _iconContainer = (checked, fillColor, unfillColor) => {
102
return {
11-
width: size,
12-
borderColor,
13-
borderRadius,
14-
height: size,
15-
borderWidth,
3+
width: 25,
4+
height: 25,
5+
borderWidth: 1,
6+
borderRadius: 20,
167
alignItems: "center",
8+
borderColor: "#ffc484",
179
justifyContent: "center",
1810
backgroundColor: checked ? fillColor : unfillColor,
1911
};

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

0 commit comments

Comments
 (0)