Open ZunairaMarwat opened 6 years ago
import React , {Component} from 'react'; import { AppRegistry,Text, View, StyleSheet, Alert } from 'react-native'; import RadioForm, {RadioButton, RadioButtonInput, RadioButtonLabel} from 'react-native-simple-radio-button';
var radio_props = [ {label: 'param1', value: 0 }, {label: 'param2', value: 1 } ];
var App = React.createClass({ getInitialState: function() { return { value: 0, } },
select_function: function(value){ console.log(value); if (value == 0) { Alert.alert( 'Your text', "Select param1" ); }
if (value == 1){ Alert.alert( 'Your Text', "Select param2" ); } }, render: function() { return (
);
} });
AppRegistry.registerComponent('App' , () => App);
import React , {Component} from 'react'; import { AppRegistry,Text, View, StyleSheet, Alert } from 'react-native'; import RadioForm, {RadioButton, RadioButtonInput, RadioButtonLabel} from 'react-native-simple-radio-button';
var radio_props = [ {label: 'param1', value: 0 }, {label: 'param2', value: 1 } ];
var App = React.createClass({ getInitialState: function() { return { value: 0, } },
select_function: function(value){ console.log(value); if (value == 0) { Alert.alert( 'Your text', "Select param1" ); }
if (value == 1){ Alert.alert( 'Your Text', "Select param2" ); } }, render: function() { return (
} });
AppRegistry.registerComponent('App' , () => App);