1.0.1 • Published 3 years ago

@dayladau/rn-round-checkbox v1.0.1

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

React Native Round Checkbox

Pure js, lightweight checkbox styled as in iOS. Depends on react-native-vector-icons

install

npm i --save @dayladau/rn-round-checkbox

Usage

import RoundCheckbox from 'rn-round-checkbox';

Example 1

<RoundCheckbox
  size={24}
  checked={this.state.isSelected}
  onValueChange={(newValue) => {console.log(newValue)}}
/>

Props

PropertyTypeDefaultDescription
iconstringios-checkmarkname of icon (from Ionicons) in the checkbox
backgroundColorstring'#007AFF'background color when checked
sizenumber24icon size
iconColorstring'white'icon color
borderColorstring'grey'border color
checkedbooleanfalsechecked
onValueChangefunctionfunction called on change with new value
styleobject{}overwrite styles that are passed to the parent

License: MIT