Socket
Socket
Sign inDemoInstall

react-native-checkbox-cus

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-checkbox-cus

勾选框


Version published
Weekly downloads
5
decreased by-70.59%
Maintainers
1
Install size
10.7 kB
Created
Weekly downloads
 

Readme

Source

react-native-checkbox-cus

勾选框

安装

npm i --save react-native-checkbox-cus

展示

ui展示图

使用

import CheckBox from "react-native-checkbox-cus";

<CheckBox
    style={{flex: 1, padding: 10}}
    onClick={(isChecked)=>{

    }}
    leftText={"CheckBox"}
/>

 <CheckBox
            style={{flex: 1, padding: 10}}
            onClick={(isChecked)=>{
                 this.setState({
                     isChecked:!isChecked
                 })
               }}
            isChecked={this.state.isChecked}
            checkedImage={<Image source={require('../../page/my/img/ic_check_box.png')} style={this.props.theme.styles.tabBarSelectedIcon}/>}
            unCheckedImage={<Image source={require('../../page/my/img/ic_check_box_outline_blank.png')} style={this.props.theme.styles.tabBarSelectedIcon}/>}
        />

API

属性类型可选默认值描述
styleViewPropTypes.styletrueCustom style checkbox
leftTextPropTypes.stringtrueCustom left Text
leftTextStyleText.propTypes.styletrueCustom left Text style
rightTextPropTypes.stringtrueCustom right Text
rightTextViewPropTypes.elementtrueCustom right TextView
rightTextStyleText.propTypes.styletrueCustom right Text style
checkedImagePropTypes.elementtrueDefault imageCustom checked Image
unCheckedImagePropTypes.elementtrueDefault imageCustom unchecked Image
isCheckedPropTypes.boolfalsefalsecheckbox checked state
onClickPropTypes.func.isRequiredfalsecallback function
disabledPropTypes.booltruefalseDisable the checkbox button
checkBoxColorPropTypes.stringtrueTint color of the checkbox image (this props is for both checked and unchecked state)
checkedCheckBoxColorPropTypes.stringtrueTint color of the checked state checkbox image (this prop will override value of checkBoxColor for checked state)
uncheckedCheckBoxColorPropTypes.stringtrueTint color of the unchecked state checkbox image (this prop will override value of checkBoxColor for unchecked state)

欢迎交流

欢迎提问交流;若有bug,请添加bug截图或代码片段,以便更快更好的解决问题。
欢迎大家一起交流

我的博客

Keywords

FAQs

Last updated on 06 Dec 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc