Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions NavbarButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<TouchableOpacity
style={styles.navBarButton}
onPress={handler}
disabled={disabled}
accessible={accessible}
accessibilityLabel={accessibilityLabel}
>
accessibilityLabel={accessibilityLabel}>
<View style={style}>
<Text style={[styles.navBarButtonText, { color: tintColor }]}>{title}</Text>
<Text style={textStyles}>{title}</Text>
</View>
</TouchableOpacity>
);
Expand All @@ -44,6 +50,7 @@ NavbarButton.propTypes = {
disabled: PropTypes.bool,
accessible: PropTypes.bool,
accessibilityLabel: PropTypes.string,
fontFamily: PropTypes.string
};

NavbarButton.defaultProps = {
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function getButtonElement(data, style) {
handler={data.handler}
accessible={data.accessible}
accessibilityLabel={data.accessibilityLabel}
fontFamily={data.fontFamily}
/>
)}
</View>
Expand Down