Header.js 752 B

12345678910111213141516171819202122232425
  1. import * as React from 'react'
  2. import { StatusBar, Platform } from 'react-native'
  3. import Constants from 'expo-constants'
  4. import { Appbar } from 'react-native-paper'
  5. import { goBack } from '../navigation/RootNavigation'
  6. export default function Header() {
  7. return (
  8. <>
  9. {Platform.OS !== 'ios' && <StatusBar backgroundColor="#FFC21C" />}
  10. <Appbar.Header
  11. dark
  12. statusBarHeight={Platform.OS === 'ios' ? Constants.statusBarHeight : 0}
  13. >
  14. <Appbar.BackAction onPress={goBack} />
  15. <Appbar.Content
  16. title="忘记密码"
  17. titleStyle={{ textAlign: 'center', fontSize: 16 }}
  18. />
  19. <Appbar.Action icon="dots-vertical" />
  20. </Appbar.Header>
  21. </>
  22. )
  23. }