Skip to content

Commit

Permalink
Support for 'disabled' buttons
Browse files Browse the repository at this point in the history
Allow 'disabled' as a prop in Buttons
  • Loading branch information
tolu360 committed Sep 20, 2016
1 parent 01da081 commit ba56abe
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/buttons/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const Button = ({
textStyle,
small,
iconRight,
disabled,
fontWeight,
fontFamily}) => {
let iconElement
Expand All @@ -55,7 +56,8 @@ const Button = ({
return (
<TouchableHighlight
underlayColor={underlayColor || 'transparent'}
onPress={onPress || log}>
onPress={onPress || log}
disabled={disabled || false}>
<View
style={[
styles.button,
Expand Down Expand Up @@ -110,7 +112,8 @@ Button.propTypes = {
fontSize: PropTypes.number,
underlayColor: PropTypes.string,
raised: PropTypes.bool,
textStyle: PropTypes.any
textStyle: PropTypes.any,
disabled: PropTypes.bool
}

styles = StyleSheet.create({
Expand Down

0 comments on commit ba56abe

Please sign in to comment.