Socket
Socket
Sign inDemoInstall

radio-button-react-native

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    radio-button-react-native

Simple Radio Button for React Native.


Version published
Weekly downloads
28
decreased by-6.67%
Maintainers
1
Install size
3.93 kB
Created
Weekly downloads
 

Readme

Source

radio-button-react-native

Simple Radio Button component for React Native

Demo

alt tag

Installation

in Cli

npm i radio-button-react-native --save

Getting started

import RadioButton from 'radio-button-react-native';

export default class Example extends Component {
constructor (props){
    super(props)
      this.state = {
            value: 0
        }
    
}


handleOnPress(value){
    this.setState({value:value})
}

render(){
    return(
        <View>
               <RadioButton currentValue={this.state.value} value={0} onPress={this.handleOnPress.bind(this)}>
                <Text>Button1</Text>
                 </RadioButton>
                      
                 <RadioButton currentValue={this.state.value} value={1} onPress={this.handleOnPress.bind(this)}>
                 <Text>Button2</Text>
                 </RadioButton>
                 
                 <RadioButton currentValue={this.state.value} value={2} onPress={this.handleOnPress.bind(this)}>
                 <Text>Button3</Text>
                 </RadioButton>
                 
        </View>
    );
}

Basic

<RadioForm
currentValue={this.state.value}
 value={0}
 onPress={this.handleOnPress.bind(this)}
 outerCircleColor:'gray'
 outerCircleSize:{24}
 outerCircleWidth:{2}
 innerCircleColor:'red'
 innerCircleSize:{12}
/>

assign a unique value to each radio button in 'value'

Props

RadioButton Component

outerCircleSize[Default:{24}]

give the size of outer Circle of Button.

outerCircleWidth[Default:{2}]

give the width of outer Circle of Button.

outerCircleColor[Default:'#9eacb4']

give the color of outer Circle of Button.

innerCircleSize[Default:{12}]

give the size of inner Circle of Button

innerCircleColor[Default:'#ff6624']

give the color of inner Circle.

Keywords

FAQs

Last updated on 18 Jan 2017

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