Initial commit

This commit is contained in:
belviskhoremk
2026-05-08 13:01:47 +00:00
parent 864bbd389e
commit 9e663bdc8b
64 changed files with 20910 additions and 74 deletions

View File

@@ -0,0 +1,38 @@
import React from 'react';
import { ActivityIndicator, View, StyleSheet, Text } from 'react-native';
import { COLORS, FONT_SIZE, SPACING } from '../../theme';
import { useTheme } from '../../theme';
interface SpinnerProps {
size?: 'small' | 'large';
color?: string;
centered?: boolean;
label?: string;
}
export function Spinner({ size = 'large', color, centered = false, label }: SpinnerProps) {
const { theme } = useTheme();
const spinnerColor = color ?? COLORS.primary;
if (centered) {
return (
<View style={styles.centered}>
<ActivityIndicator size={size} color={spinnerColor} />
{label ? <Text style={[styles.label, { color: theme.textSecondary }]}>{label}</Text> : null}
</View>
);
}
return <ActivityIndicator size={size} color={spinnerColor} />;
}
const styles = StyleSheet.create({
centered: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
padding: SPACING.xxxl,
gap: SPACING.md,
},
label: { fontSize: FONT_SIZE.sm },
});