|
27 | 27 |
|
28 | 28 | Add the dependency: |
29 | 29 |
|
| 30 | +<b>Zero Dependency</b> |
| 31 | + |
30 | 32 | ### React Native |
31 | 33 |
|
32 | 34 | ```ruby |
@@ -73,25 +75,26 @@ import BouncyCheckbox from "react-native-bouncy-checkbox"; |
73 | 75 |
|
74 | 76 | ### Configuration - Props |
75 | 77 |
|
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 | |
| 78 | +| Property | Type | Default | Description | |
| 79 | +| -------------------- | :-------: | :---------: | ------------------------------------------------------------------------------------------------------------------------------------------ | |
| 80 | +| text | string | undefined | set the checkbox's text | |
| 81 | +| onPress | function | null | set your own onPress functionality after the bounce effect, callback receives the next `isChecked` boolean if disableBuiltInState is false | |
| 82 | +| disableText | boolean | false | if you want to use checkbox without text, you can enable it | |
| 83 | +| size | number | 25 | size of `width` and `height` of the checkbox | |
| 84 | +| style | style | default | set/override the container style | |
| 85 | +| textStyle | style | default | set/override the text style | |
| 86 | +| iconStyle | style | default | set/override the icon style | |
| 87 | +| isChecked | boolean | false | set the default checkbox value | |
| 88 | +| fillColor | color | #f09f48 | change the checkbox's filled color | |
| 89 | +| unfillColor | color | transparent | change the checkbox's un-filled color when it's not checked | |
| 90 | +| useNativeDriver | boolean | true | enable/disable the useNativeDriver for animation | |
| 91 | +| iconComponent | component | Icon | set your own icon component | |
| 92 | +| checkIconImageSource | image | default | set your own check icon image | |
| 93 | +| ImageComponent | component | Image | set your own Image component instead of RN's default Image | |
| 94 | +| bounceEffect | number | 1 | change the bounce effect | |
| 95 | +| bounceFriction | number | 3 | change the bounce friction | |
| 96 | +| disableBuiltInState | boolean | false | if you want to manually handle the `isChecked` prop and disable built in handling | |
| 97 | +| textContainerStyle | ViewStyle | default | set/override the text container style | |
95 | 98 |
|
96 | 99 | ## Synthetic Press Functionality with Manual Check State |
97 | 100 |
|
@@ -150,9 +153,7 @@ const App = () => { |
150 | 153 | isChecked={checkboxState} |
151 | 154 | text="Synthetic Checkbox" |
152 | 155 | disableBuiltInState |
153 | | - onPress={() => |
154 | | - setCheckboxState(!checkboxState) |
155 | | - } |
| 156 | + onPress={() => setCheckboxState(!checkboxState)} |
156 | 157 | /> |
157 | 158 | <RNBounceable |
158 | 159 | style={{ |
|
0 commit comments