I am converting React code to React Native. So I need to implement radio buttons.
Maybe you could style into a circle button such as a radio button or something:
const period = [
{
key: 1,
name : '1 Month',
value : 1,
},
{
key : 2,
name : '12 Month',
value : 12,
}
];
constructor(props) {
super(props);
this.state = {
value: 0,
};
}
onChangeTabs = (tabs) => {
this.setState({
value : tabs,
})
}
renderTabs = () => {
return period.map(item => (
{item.name}
));
};
const styles = StyleSheet.create({
period: {
borderRadius: 5,
borderColor: '#fff',
borderWidth: 1,
marginHorizontal: 5,
},
periodActive: {
backgroundColor: '#333',
},
});