Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ see this simple [example](https://github.com/sramezani/radio-buttons-react-nativ
| boxActiveBgColor | background color of active item, when box is true | '#e1f5fe33' |
| boxDeactiveBgColor | background color of deactive items, when box is true | '#fff' |
| textColor | label color | '#383838' |
| disabled | flag to disable radio buttons | false |

# Contributing
Yes of course! Welcome :)
Expand Down
5 changes: 4 additions & 1 deletion RadioButtonRN.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class RadioButtonRN extends React.Component {

render() {
let { activeIndex, fadeAnim, animations } = this.state;
let { boxStyle, style, circleSize, textStyle, data, icon, activeColor, deactiveColor, boxActiveBgColor, boxDeactiveBgColor, box, textColor } = this.props;
let { boxStyle, style, circleSize, textStyle, data, icon, activeColor, deactiveColor, boxActiveBgColor, boxDeactiveBgColor, box, textColor, disabled } = this.props;

return (
<View style={style}>
Expand All @@ -133,6 +133,7 @@ class RadioButtonRN extends React.Component {
, boxStyle]}
activeOpacity={0.9}
onPress={() => this._changeRadio(item, index)}
disabled={disabled}
>
<View style={styles.leftProductBox}>
<View style={[ icon ? styles.icon : styles.circle, {
Expand Down Expand Up @@ -247,6 +248,7 @@ RadioButtonRN.propTypes = {
boxDeactiveBgColor: PropTypes.string,
textColor: PropTypes.string,
box: PropTypes.bool,
disabled: PropTypes.bool,
};

RadioButtonRN.defaultProps = {
Expand All @@ -265,6 +267,7 @@ RadioButtonRN.defaultProps = {
boxDeactiveBgColor: '#fff',
textColor: '#383838',
box: true,
disabled: false,
};

/* Export Component ============================ */
Expand Down