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