Skip to content

Commit

Permalink
Pass onButtonPress prop to PricingCard Component so that it can do so…
Browse files Browse the repository at this point in the history
…mething upon press.
  • Loading branch information
zibs committed Oct 26, 2016
1 parent 8774b94 commit 802608a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/pricing/PricingCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const PricingCard = ({
titleFont,
pricingFont,
infoFont,
buttonFont
buttonFont,
onButtonPress
}) => (
<View style={[styles.container, containerStyle && containerStyle]}>
<View style={[styles.wrapper, wrapperStyle && wrapperStyle]}>
Expand Down Expand Up @@ -48,7 +49,9 @@ const PricingCard = ({
{backgroundColor: color},
buttonFont && {fontFamily: buttonFont}
]}
title={button.title} />
title={button.title}
onPress={onButtonPress}
/>
</View>
</View>
)
Expand All @@ -63,7 +66,8 @@ PricingCard.propTypes = {
]),
info: PropTypes.array,
button: PropTypes.object,
color: PropTypes.string
color: PropTypes.string,
onButtonPress: PropTypes.any,
}

PricingCard.defaultProps = {
Expand Down

0 comments on commit 802608a

Please sign in to comment.