mirror of
https://github.com/zimplexing/OrionTV.git
synced 2026-02-04 03:36:29 +08:00
28 lines
596 B
TypeScript
28 lines
596 B
TypeScript
import React from "react";
|
|
import { View, StyleSheet, ActivityIndicator } from "react-native";
|
|
|
|
interface LoadingOverlayProps {
|
|
visible: boolean;
|
|
}
|
|
|
|
export const LoadingOverlay: React.FC<LoadingOverlayProps> = ({ visible }) => {
|
|
if (!visible) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<View style={styles.loadingOverlay}>
|
|
<ActivityIndicator size="large" color="#fff" />
|
|
</View>
|
|
);
|
|
};
|
|
|
|
const styles = StyleSheet.create({
|
|
loadingOverlay: {
|
|
...StyleSheet.absoluteFillObject,
|
|
justifyContent: "center",
|
|
alignItems: "center",
|
|
backgroundColor: "rgba(0,0,0,0.5)",
|
|
},
|
|
});
|