Files
aliasvault/apps/mobile-app/components/LoadingOverlay.tsx
2025-05-04 13:48:14 +02:00

38 lines
879 B
TypeScript

import { StyleSheet, View } from 'react-native';
import LoadingIndicator from './LoadingIndicator';
type LoadingOverlayProps = {
status: string;
};
/**
* LoadingOverlay component
*
* This component displays a loading indicator overlay over the entire screen.
* It is used to indicate that a process is in progress and the user should wait.
*
*/
export default function LoadingOverlay({ status }: LoadingOverlayProps): React.ReactNode {
const backgroundColor = 'rgba(0,0,0,0.5)';
const styles = StyleSheet.create({
container: {
alignItems: 'center',
backgroundColor: backgroundColor,
bottom: 0,
justifyContent: 'center',
left: 0,
position: 'absolute',
right: 0,
top: 0,
zIndex: 1000,
},
});
return (
<View style={styles.container}>
<LoadingIndicator status={status} />
</View>
);
}