Skip to content

Commit

Permalink
Add underlayColor props to SocialIcon
Browse files Browse the repository at this point in the history
  • Loading branch information
xavier-villelegier committed Nov 23, 2017
1 parent 40f4df3 commit f973972
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/API/social_icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import { SocialIcon } from 'react-native-elements'
| iconStyle | none | object (style) | extra styling for icon component (optional) |
| style | none | object (style) | button styling (optional) |
| iconColor | white | string | icon color (optional) |
| underlayColor | none | string | underlay color (optional) |
| iconSize | 24 | number | icon size (optional) |
| component | TouchableHighlight | React Native Component | type of button (optional) |
| fontFamily | System font bold (iOS), Sans Serif Black (android) | string | specify different font family (optional) |
Expand Down
4 changes: 3 additions & 1 deletion src/social/SocialIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const SocialIcon = props => {
iconStyle,
style,
iconColor,
underlayColor,
title,
raised,
light,
Expand Down Expand Up @@ -81,7 +82,7 @@ const SocialIcon = props => {
return (
<Component
{...attributes}
underlayColor={light ? 'white' : colors[type]}
underlayColor={light ? 'white' : underlayColor || colors[type]}
onLongPress={disabled ? null : onLongPress || log}
onPress={(!disabled || log) && (onPress || log)}
disabled={disabled || false}
Expand Down Expand Up @@ -137,6 +138,7 @@ SocialIcon.propTypes = {
iconStyle: ViewPropTypes.style,
style: ViewPropTypes.style,
iconColor: PropTypes.string,
underlayColor: PropTypes.string,
title: PropTypes.string,
raised: PropTypes.bool,
disabled: PropTypes.bool,
Expand Down

0 comments on commit f973972

Please sign in to comment.