From 7a965d603546b2a20358f1fddefb10fa4ee98137 Mon Sep 17 00:00:00 2001 From: Chris Duarte Date: Mon, 13 Nov 2017 09:49:36 -0800 Subject: [PATCH] Allow iconSize to be passed from config (#1135) --- app/screens/user_profile/user_profile.js | 1 + app/screens/user_profile/user_profile_row.js | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/screens/user_profile/user_profile.js b/app/screens/user_profile/user_profile.js index 29c34a600..b5f4b6f65 100644 --- a/app/screens/user_profile/user_profile.js +++ b/app/screens/user_profile/user_profile.js @@ -137,6 +137,7 @@ class UserProfile extends PureComponent { icon={l.icon} iconType={l.iconType} theme={this.props.theme} + iconSize={l.iconSize} /> ); }); diff --git a/app/screens/user_profile/user_profile_row.js b/app/screens/user_profile/user_profile_row.js index 30ce4fa9f..784dd9437 100644 --- a/app/screens/user_profile/user_profile_row.js +++ b/app/screens/user_profile/user_profile_row.js @@ -61,7 +61,7 @@ function createTouchableComponent(children, action) { } function userProfileRow(props) { - const {action, defaultMessage, detail, icon, textId, togglable, theme, iconType, shouldRender = true} = props; + const {action, defaultMessage, detail, icon, textId, togglable, theme, iconType, iconSize, shouldRender = true} = props; if (!shouldRender) { return null; @@ -74,7 +74,7 @@ function userProfileRow(props) { @@ -118,6 +118,7 @@ userProfileRow.propTypes = { icon: PropTypes.string.isRequired, iconType: PropTypes.oneOf(['fontawesome', 'foundation', 'ion', 'material']), iconColor: PropTypes.string, + iconSize: PropTypes.number, textId: PropTypes.string.isRequired, togglable: PropTypes.bool, textColor: PropTypes.string, @@ -126,6 +127,7 @@ userProfileRow.propTypes = { userProfileRow.defaultProps = { iconColor: 'rgba(0, 0, 0, 0.7)', + iconSize: 15, textColor: '#000', togglable: false };