0.0.4 • Published 7 years ago

react-native-custom-component-checkbox v0.0.4

Weekly downloads
27
License
-
Repository
github
Last release
7 years ago

react-native-custom-component-checkbox

Checkbox component for React native for both android and ios

Installation:

Install the component through npm using:

npm install react-native-custom-component-checkbox --save

Example:

import CheckBox from 'react-native-custom-component-checkbox';

let data=[{typedValue:1,isTextInputField:false,isRequired:true,label:"first item",isImage:false,text:""},
          {typedValue:2,isTextInputField:true,isRequired:true,label:"",isImage:false,text:""},
          {typedValue:3,isTextInputField:false,isRequired:false,label:"",isImage:true,url:''},
          {typedValue:3,isTextInputField:false,isRequired:false,label:"None of the above",isImage:false,url:'',noneOfabove:'true'}];

<Checkbox
 dataSource={data}
 onItemChecked={(data,i)=>{
 }}
 itemShowKey="label"
 itemCheckedKey="RNchecked"
 labelHorizontal={true}
/>

Props:

* - mandatory

Props NameDescription
labeltext that will be displayed along the checkbox
* dataSourcedescribes parameters in an array for the custom components
* onItemCheckedfunction defined to get a call back when each component whether selected or not
itemShowKeydescribes the text to be displayed for each checkbox
itemCheckedKeycheck condition whether a checkbox selected or not
labelHorizontalalign label horizontal with the checkbox
textInputStyleuser could define the styles for the text input
imageStyleuser could define styles for the image
checkboxStyleuser could define styles for checkbox
contentContainerStylestyle object that will be applied to the container