xref: /MusicFree/src/components/base/statusBar.tsx (revision 6704747af84cebd842b258efac7143542722fac5)
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        zIndex: 10000,
16        position: 'absolute',
17        top: 0,
18        backgroundColor: backgroundColor ?? colors.primary,
19        width: rpx(750),
20        height: StatusBar.currentHeight,
21      }}></View>
22  );
23}
24