import React from 'react'; import { StyleSheet, TouchableOpacity, View } from 'react-native'; import TextView from './TextView'; export default ToolbarUgly = ({ title, scope, showBack=true, rightIcon, onBackPress }) => ( { showBack && { if (onBackPress) { onBackPress(); } else { goBack(); } }}> } {scope ? $t(scope) : title} { rightIcon ? rightIcon() : showBack ? : <> } ) const styles = StyleSheet.create({ toolbarUgly: { paddingTop: statusHeight, alignItems: 'center', flexDirection: 'row', backgroundColor: colorLight }, uglyIcon: { height: 40, paddingLeft: 16, paddingRight: 8, alignItems: 'center', justifyContent: 'center' }, titleText: { flex: 1, color: textPrimary, padding: 0, fontSize: 20, fontWeight: 'bold', textAlign: 'left', //textTransform: 'uppercase' } })