Skip to content

Commit 6ab327d

Browse files
authored
Merge pull request #9 from nikndr/master
added border width for more convenient customization
2 parents 5d67c50 + 2f85494 commit 6ab327d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/src/BouncyCheckbox.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class BouncyCheckbox extends Component {
4545
unfillColor,
4646
checkboxSize,
4747
borderRadius,
48+
borderWidth,
4849
iconComponent,
4950
} = this.props;
5051
return (
@@ -54,6 +55,7 @@ class BouncyCheckbox extends Component {
5455
checkboxSize,
5556
checked,
5657
borderRadius,
58+
borderWidth,
5759
borderColor,
5860
fillColor,
5961
unfillColor
@@ -124,6 +126,7 @@ BouncyCheckbox.propTypes = {
124126
unfillColor: PropTypes.string,
125127
borderColor: PropTypes.string,
126128
borderRadius: PropTypes.number,
129+
borderWidth: PropTypes.number,
127130
checkboxSize: PropTypes.number,
128131
useNativeDriver: PropTypes.bool,
129132
disableTextDecoration: PropTypes.bool,
@@ -138,6 +141,7 @@ BouncyCheckbox.defaultProps = {
138141
iconType: "Entypo",
139142
textColor: "#757575",
140143
borderRadius: 25 / 2,
144+
borderWidth: 1,
141145
fillColor: "#ffc484",
142146
iconColor: "#fdfdfd",
143147
text: "Call my mom 😇",

lib/src/BouncyCheckbox.style.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export const _iconContainer = (
33
checked,
44
borderRadius,
55
borderColor,
6+
borderWidth,
67
fillColor,
78
unfillColor
89
) => {
@@ -11,7 +12,7 @@ export const _iconContainer = (
1112
borderColor,
1213
borderRadius,
1314
height: size,
14-
borderWidth: 1,
15+
borderWidth,
1516
alignItems: "center",
1617
justifyContent: "center",
1718
backgroundColor: checked ? fillColor : unfillColor,

0 commit comments

Comments
 (0)