WARNING: This is significantly modified fork of react-native-checkbox
that allows
for any custom component to be used as the checked and unchecked state.
Checkbox component for React native
Add the following to your package.json
"react-native-checkbox": "https://github.com/dan-nyanko/react-native-checkbox#master",
<CheckBox
label='Label'
checked={true}
onChange={(checked) => console.log('I am checked', checked)}
uncheckedComponent={<Icon name='circle-o' size={28} color='#FEABAB' />}
checkedComponent={<Icon name='check-circle' size={28} color='#BDE3A7' />}
/>
label
: text that will be displayed along the checkboxlabelBefore
: position the label before the checkbox (boolean). The default value is falsecheckedComponent
: component that will be used as the checked stateuncheckedComponent
: component that will be used for the unchecked statelabelStyle
: style object that will be applied to the labelchecked
: initial checked valueonChange
: callback function that will be invoked with the toggled checked property as argument.