xref: /MusicFree/src/components/base/statusBar.tsx (revision 19dc08ecf646164591cb30515347b693c01518c7)
1import React, {} from 'react';
2import {StatusBar, StatusBarProps, View} from 'react-native';
3import useColors from '@/hooks/useColors';
4import rpx from '@/utils/rpx';
5
6interface IStatusBarProps extends StatusBarProps {}
7
8export default function (props: IStatusBarProps) {
9  const colors = useColors();
10  const {backgroundColor} = props;
11
12  return (
13    <View
14      style={{
15        position: 'absolute',
16        top: 0,
17        backgroundColor: backgroundColor ?? colors.primary,
18        width: rpx(750),
19        height: StatusBar.currentHeight,
20      }}></View>
21  );
22}
23