import React from 'react';
import { Pressable, StyleSheet, View } from 'react-native';
import TopChargeBackground from '../icons/TopChargeBackground';
import HeaderTitle from './HeaderTitle';
export const BackButton = ({style=Styles.backIcon, color=pageTitleTint, children, onPress}) => {
return (
[
(pressed && isIOS) && {
opacity: 0.5
},
style
]}
android_ripple = {rippleLessIcon}
onPress={() => {
if (onPress) {
onPress();
} else {
goBack();
}
}}>
{ children
? children
:
}
)
}
export const BackIcon = ({color=pageTitleTint}) => {
return
}
export const StationBack = ({bottom = 24, scale=1.0}) => {
return (
//
);
}
export default Toolbar = ({
title,
scope,
showBack=true,
rightIcon,
onBackPress
}) => {
return (
{ showBack &&
}
{ rightIcon
? rightIcon()
: showBack
?
: <>>
}
)
}
export const Styles = StyleSheet.create({
toolbar: {
height: toolbarSize + statusHeight,
paddingLeft: 2,
paddingRight: 2,
paddingTop: statusHeight,
alignItems: 'center',
flexDirection: 'row',
justifyContent: 'center',
backgroundColor: colorPrimary
},
backIcon: {
width: 48,
height: 48,
zIndex: 2,
alignItems: 'center',
justifyContent: 'center'
},
content: {
flex: 1,
paddingRight: 48,
alignItems: 'center'
},
logo: {
width:123.8,
height: 38.95
},
rightIcon: {
width: 22,
height: 22,
opacity: 0.9
},
iconOpacity: {
opacity: 0.9
},
titleText: {
flex: 1,
color: pageTitleTint,
paddingLeft: isIOS ? 8 : 16
}
});