diff --git a/NavbarButton.js b/NavbarButton.js index adee186..e37e576 100644 --- a/NavbarButton.js +++ b/NavbarButton.js @@ -7,10 +7,13 @@ import { import PropTypes from 'prop-types' import styles from './styles'; +import Icon from 'react-native-vector-icons/FontAwesome'; export default function NavbarButton(props) { const { style, + icon, + iconSize, tintColor, title, handler, @@ -28,7 +31,12 @@ export default function NavbarButton(props) { accessibilityLabel={accessibilityLabel} > - {title} + + { icon && + + } + {title} + ); @@ -39,6 +47,8 @@ NavbarButton.propTypes = { PropTypes.object, PropTypes.array, ]), + icon: PropTypes.string, + iconSize: PropTypes.number, tintColor: PropTypes.string, title: PropTypes.string, handler: PropTypes.func, @@ -49,6 +59,8 @@ NavbarButton.propTypes = { NavbarButton.defaultProps = { style: {}, + icon: '', + iconSize: 22, title: '', tintColor: '#0076FF', disabled: false,