Skip to content

Commit e41153d

Browse files
authored
Merge pull request #40 from aprilmintacpineda/patch-1
Update README.md to reflect changes with disableBuiltInState
2 parents 54d1997 + 26f3a00 commit e41153d

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

README.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -73,24 +73,25 @@ import BouncyCheckbox from "react-native-bouncy-checkbox";
7373

7474
### Configuration - Props
7575

76-
| Property | Type | Default | Description |
77-
| -------------------- | :-------: | :------------: | ----------------------------------------------------------- |
78-
| text | string | undefined | set the checkbox's text |
79-
| onPress | function | null | set your own onPress functionality after the bounce effect |
80-
| disableText | boolean | false | if you want to use checkbox without text, you can enable it |
81-
| size | number | 25 | size of `width` and `height` of the checkbox |
82-
| style | style | default | set/override the container style |
83-
| textStyle | style | default | set/override the text style |
84-
| iconStyle | style | default | set/override the icon style |
85-
| isChecked | boolean | false | set the default checkbox value |
86-
| fillColor | color | #f09f48 | change the checkbox's filled color |
87-
| unfillColor | color | transparent | change the checkbox's un-filled color when it's not checked |
88-
| useNativeDriver | boolean | true | enable/disable the useNativeDriver for animation |
89-
| iconComponent | component | Icon | set your own icon component |
90-
| checkIconImageSource | image | default | set your own check icon image |
91-
| ImageComponent | component | Image | set your own Image component instead of RN's default Image |
92-
| bounceEffect | number | 1 | change the bounce effect |
93-
| bounceFriction | number | 3 | change the bounce friction |
76+
| Property | Type | Default | Description |
77+
| -------------------- | :-------: | :------------: | ----------------------------------------------------------------------------------|
78+
| text | string | undefined | set the checkbox's text |
79+
| onPress | function | null | set your own onPress functionality after the bounce effect, callback receives the next `isChecked` boolean if disableBuiltInState is false |
80+
| disableText | boolean | false | if you want to use checkbox without text, you can enable it |
81+
| size | number | 25 | size of `width` and `height` of the checkbox |
82+
| style | style | default | set/override the container style |
83+
| textStyle | style | default | set/override the text style |
84+
| iconStyle | style | default | set/override the icon style |
85+
| isChecked | boolean | false | set the default checkbox value |
86+
| fillColor | color | #f09f48 | change the checkbox's filled color |
87+
| unfillColor | color | transparent | change the checkbox's un-filled color when it's not checked |
88+
| useNativeDriver | boolean | true | enable/disable the useNativeDriver for animation |
89+
| iconComponent | component | Icon | set your own icon component |
90+
| checkIconImageSource | image | default | set your own check icon image |
91+
| ImageComponent | component | Image | set your own Image component instead of RN's default Image |
92+
| bounceEffect | number | 1 | change the bounce effect |
93+
| bounceFriction | number | 3 | change the bounce friction |
94+
| disableBuiltInState | boolean | false | if you want to manually handle the `isChecked` prop and disable built in handling |
9495

9596
## Synthetic Press Functionality with Manual Check State
9697

@@ -101,7 +102,7 @@ import BouncyCheckbox from "react-native-bouncy-checkbox";
101102

102103
Please check the `example-manual-state` runable project to how to make it work on a real project.
103104

104-
<b><i>Becareful while using `disableBuiltInState` you MUST set the `isChecked` prop to use your own check state manually.</b></i>
105+
<b><i>Becareful while using `disableBuiltInState` you MUST set the `isChecked` prop to use your own check state manually.</b></i> The `onPress` callback will **NOT** receive the next `isChecked` when `disableBuiltInState` is used.
105106

106107
Here is the basic implementation:
107108

0 commit comments

Comments
 (0)