From b662bb86b169c7d158fb19a852c015f2599d3fd1 Mon Sep 17 00:00:00 2001 From: sergiuLucaci Date: Wed, 17 May 2017 15:27:46 +0300 Subject: [PATCH 1/2] fontFamily option integrated for the controls. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I integrated an option that would update the family font for the controls. So, leftButton / rightButton has a new property so called ‘fontFamily’ that expects a string as a PropType. --- NavbarButton.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/NavbarButton.js b/NavbarButton.js index adbb398..a9d97f4 100644 --- a/NavbarButton.js +++ b/NavbarButton.js @@ -15,19 +15,25 @@ export default function NavbarButton(props) { handler, disabled, accessible, - accessibilityLabel + accessibilityLabel, + fontFamily } = props; + let textStyles = [styles.navBarButtonText, { color: tintColor }]; + + if (fontFamily) { + textStyles.push({fontFamily: fontFamily}); + } + return ( + accessibilityLabel={accessibilityLabel}> - {title} + {title} ); @@ -44,6 +50,7 @@ NavbarButton.propTypes = { disabled: PropTypes.bool, accessible: PropTypes.bool, accessibilityLabel: PropTypes.string, + fontFamily: PropTypes.string }; NavbarButton.defaultProps = { From 55f532d8d24533d8518e0183c84aa703d79d809b Mon Sep 17 00:00:00 2001 From: sergiuLucaci Date: Wed, 17 May 2017 15:31:29 +0300 Subject: [PATCH 2/2] fontFamily option integrated for the controls. index updated, so the NavbarButton would now about the fontFamily prop. --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 4eea18c..95ecb9b 100644 --- a/index.js +++ b/index.js @@ -40,6 +40,7 @@ function getButtonElement(data, style) { handler={data.handler} accessible={data.accessible} accessibilityLabel={data.accessibilityLabel} + fontFamily={data.fontFamily} /> )}