Skip to content

Latest commit

 

History

History
40 lines (38 loc) · 1.07 KB

RadioButton.md

File metadata and controls

40 lines (38 loc) · 1.07 KB

Usage

...
import { RadioButton } from 'react-native-material-ui';
...
render() {
    <View>
      <RadioButton
          label="Unchecked"
          checked={this.state.checked}
          value="Value"
          onCheck={checked => this.setState({ checked })}
      />
      <RadioButton label="Checked by default" checked value="Value" />
      <RadioButton
          label="Custom icon"
          checked
          uncheckedIcon="star-border"
          checkedIcon="star"
          value="Value"
      />
      <RadioButton label="Disabled unchecked" disabled value="Value" />
      <RadioButton label="Disabled checked" checked disabled value="Value" />
    </View>
}

API

const propTypes = {
    label: PropTypes.string.isRequired,
    value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
    checked: PropTypes.bool,
    disabled: PropTypes.bool,
    onSelect: PropTypes.func.isRequired,
    theme: PropTypes.string,
};