xref: /MusicFree/src/components/base/statusBar.tsx (revision 5d19d26c98d1c233995663070b95e5f28b5b9e1c)
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            }}
22        />
23    );
24}
25