Files
omnex-demo-app/omnex-plateform-client/src/components/ui/LoadingSpinner.tsx
T
Xor290 bef57d91de
Omnex Plateform App - EAS Build / build (push) Canceled after 7m42s
Omnex Plateform Client - EAS Build / build (push) Canceled after 4m43s
chore: build
2026-08-04 21:18:12 +02:00

40 lines
1.0 KiB
TypeScript

import React from "react";
import { View, ActivityIndicator, Text, StyleSheet } from "react-native";
import { spacing, fontSize } from "../../theme";
import { useTheme } from "../../context/ThemeContext";
interface LoadingSpinnerProps {
message?: string;
size?: "small" | "large";
}
export default function LoadingSpinner({
message,
size = "large",
}: LoadingSpinnerProps) {
const { colors } = useTheme();
return (
<View style={[styles.container, { backgroundColor: colors.bgPrimary }]}>
<ActivityIndicator size={size} color={colors.accent} />
{message && (
<Text style={[styles.text, { color: colors.textSecondary }]}>
{message}
</Text>
)}
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: "center",
alignItems: "center",
padding: spacing.xl,
},
text: {
fontSize: fontSize.md,
marginTop: spacing.l,
},
});