| 123456789101112131415161718192021222324252627 |
- /* eslint-disable react/style-prop-object */
- import * as React from 'react';
- import { View } from 'react-native';
- import { StatusBar } from 'expo-status-bar';
- import { Appbar } from 'react-native-paper';
- import { goBack } from '../navigation/RootNavigation';
- export default function Header({ title, noBack }) {
- return (
- <>
- <StatusBar backgroundColor="#FFC21C" style="light" translucent />
- <Appbar.Header dark>
- {!noBack && <Appbar.BackAction onPress={goBack} />}
- <Appbar.Content
- title={title || ''}
- titleStyle={{ textAlign: 'center', fontSize: 16 }}
- />
- {!noBack && (
- <Appbar.Action
- icon={() => <View style={{ width: 24, height: 24 }} />}
- />
- )}
- </Appbar.Header>
- </>
- );
- }
|