1import React from 'react'; 2import {Appbar} from 'react-native-paper'; 3import {StyleSheet, View} from 'react-native'; 4import rpx from '@/utils/rpx'; 5import {useNavigation} from '@react-navigation/native'; 6import usePrimaryColor from '@/hooks/usePrimaryColor'; 7 8interface IProps {} 9export default function (props: IProps) { 10 const navigation = useNavigation(); 11 const primaryColor = usePrimaryColor(); 12 13 return ( 14 <View style={[{backgroundColor: primaryColor}]}> 15 <Appbar.Header style={[style.appbar, {backgroundColor: primaryColor}]}> 16 <Appbar.BackAction 17 onPress={() => { 18 navigation.goBack(); 19 }} 20 /> 21 <Appbar.Content title="歌单" /> 22 <Appbar.Action icon="magnify" onPress={() => {}} /> 23 <Appbar.Action icon={'dots-vertical'} onPress={() => {}} /> 24 </Appbar.Header> 25 </View> 26 ); 27} 28 29const style = StyleSheet.create({ 30 appbar: { 31 shadowColor: 'transparent', 32 flexDirection: 'row', 33 width: rpx(750), 34 }, 35}); 36