feat: Expo scaffold + auth screens + core screens (#39-#46, #48)
This commit is contained in:
34
components/LoadingSpinner.tsx
Normal file
34
components/LoadingSpinner.tsx
Normal file
@@ -0,0 +1,34 @@
|
||||
import React from 'react';
|
||||
import { View, ActivityIndicator, Text } from 'react-native';
|
||||
|
||||
interface LoadingSpinnerProps {
|
||||
message?: string;
|
||||
fullScreen?: boolean;
|
||||
size?: 'small' | 'large';
|
||||
}
|
||||
|
||||
export const LoadingSpinner: React.FC<LoadingSpinnerProps> = ({
|
||||
message,
|
||||
fullScreen = false,
|
||||
size = 'large',
|
||||
}) => {
|
||||
if (fullScreen) {
|
||||
return (
|
||||
<View className="flex-1 items-center justify-center bg-gray-50">
|
||||
<ActivityIndicator size={size} color="#2563EB" />
|
||||
{message && (
|
||||
<Text className="mt-3 text-gray-500 text-sm">{message}</Text>
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<View className="items-center justify-center py-8">
|
||||
<ActivityIndicator size={size} color="#2563EB" />
|
||||
{message && (
|
||||
<Text className="mt-2 text-gray-500 text-sm">{message}</Text>
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user