Appbar.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import React from 'react';
  2. import { Image, Pressable, StyleSheet, View } from 'react-native';
  3. export const BackButton = ({navigation}) => {
  4. return (
  5. <Pressable
  6. style={Styles.backIcon}
  7. android_ripple = {{
  8. color: '#909090',
  9. radius: 22,
  10. borderless: true
  11. }}
  12. onPress={() => {
  13. goBack();
  14. }}>
  15. <BackIcon/>
  16. </Pressable>
  17. )
  18. }
  19. export const BackIcon = () => {
  20. return <MaterialIcons name={isIOS ? 'arrow-back-ios' : 'arrow-back'} size={24} color={colorDark} />
  21. }
  22. export const StationBack = ({bottom}) => {
  23. return (
  24. <Image
  25. style={{
  26. right: 0,
  27. bottom: bottom ?? 24,
  28. width: 125.8,
  29. height: 137.64,
  30. zIndex: 0,
  31. position: 'absolute'
  32. }}
  33. source={require('../images/charge/bg-top-station.png')}/>
  34. );
  35. }
  36. export const Styles = StyleSheet.create({
  37. toolbar: {
  38. height: 56,
  39. paddingLeft: 2,
  40. paddingRight: 2,
  41. alignItems: 'center',
  42. flexDirection: 'row',
  43. backgroundColor: colorPrimary
  44. },
  45. backIcon: {
  46. width: 48,
  47. height: 48,
  48. alignItems: 'center',
  49. justifyContent: 'center'
  50. },
  51. content: {
  52. flex: 1,
  53. paddingRight: 48,
  54. alignItems: 'center'
  55. },
  56. logo: {
  57. width: 123.8,
  58. height: 38.95
  59. }
  60. });
  61. export default Appbar = (props) => {
  62. return (
  63. <View style={Styles.toolbar}>
  64. <BackButton {...props}/>
  65. <View style={Styles.content}>
  66. <Image
  67. source={require('../images/tool-logo.png')}
  68. style={Styles.logo}
  69. resizeMode="contain"
  70. />
  71. </View>
  72. </View>
  73. )
  74. }