Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-native-radio-button-group
Advanced tools
Readme
Simple and handy animated Radio group button for React Native in Android and IOS
.
in Cli
npm i react-native-radio-button-group --save
OR
yarn add react-native-radio-button-group
import RadioGroup from 'react-native-radio-button-group';
var radiogroup_options = [
{id: 0, label: 'Button1' },
{id: 1, label: 'Button2' },
{id: 2, label: 'Button3' },
{id: 3, label: 'Button4' },
];
var RadioGroupProject = React.createClass({
getInitialState: function() {
return {
selectedOption: null,
}
},
render: function() {
return (
<View>
<RadioGroup
options={radiogroup_options}
onChange={(option) => this.setState({selectedOption: option})}
/>
</View>
);
}
});
Key | Type | Default | Value |
---|---|---|---|
options | Array | [ ] | Option |
horizontal | Boolean | false | true / false |
activeButtonId | String / Number | _ | option id from the given options array |
onChange | function | _ | callback function |
circleStyle | Object | CircleStyle | CircleStyle with even more properties as required. |
{
id: number | string,
label: string,
labelView: Element
}
{
width: 22,
height: 22,
borderColor: '#000',
borderWidth: 0.8,
marginRight: 10,
fillColor: '#279315'
}
Note : 'fillColor' used to change the background color of the circle on select.
<RadioGroup
horizontal
options={radiogroup_options}
/>
<RadioGroup
options={[
{
id: 0,
labelView: (
<Text style={{flex: 1}}>
Button label as <Text style={{ color: 'red' }}>View</Text>
</Text>
),
},
{ id: 1, label: 'Button2' },
{ id: 2, label: 'Button3' },
]}
activeButtonId={0}
/>
<RadioGroup
horizontal
options={[
{
id: 0,
labelView: (
<Text>
Button label as <Text style={{ color: 'red' }}>View</Text>
</Text>
),
},
{ id: 1, label: 'Button2' },
{ id: 2, label: 'Button3' },
]}
activeButtonId={0}
circleStyle={{ fillColor: 'pink', borderColor: 'cyan' }}
/>
MIT
FAQs
Simple and handy animated Radio group button for React Native
The npm package react-native-radio-button-group receives a total of 45 weekly downloads. As such, react-native-radio-button-group popularity was classified as not popular.
We found that react-native-radio-button-group demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.