managarten/apps-archived/memoro/apps/mobile/components/molecules/SpinnerAnimation.tsx
Till-JS 61d181fbc2 chore: archive inactive projects to apps-archived/
Move inactive projects out of active workspace:
- bauntown (community website)
- maerchenzauber (AI story generation)
- memoro (voice memo app)
- news (news aggregation)
- nutriphi (nutrition tracking)
- reader (reading app)
- uload (URL shortener)
- wisekeep (AI wisdom extraction)

Update CLAUDE.md documentation:
- Add presi to active projects
- Document archived projects section
- Update workspace configuration

Archived apps can be re-activated by moving back to apps/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 07:03:59 +01:00

62 lines
1.3 KiB
TypeScript

import React, { useEffect, useRef } from 'react';
import { View, Animated, ViewStyle } from 'react-native';
import { useTheme } from '~/features/theme/ThemeProvider';
interface SpinnerAnimationProps {
size?: number;
style?: ViewStyle;
color?: string;
thickness?: number;
}
/**
* Minimalistischer rotierender Spinner
* Clean und modern - inspiriert von iOS/Material Design
*/
export function SpinnerAnimation({
size = 60,
style,
color,
thickness = 4,
}: SpinnerAnimationProps) {
const { colors, isDark } = useTheme();
const rotateAnim = useRef(new Animated.Value(0)).current;
const spinnerColor = color || colors.primary;
useEffect(() => {
const animation = Animated.loop(
Animated.timing(rotateAnim, {
toValue: 1,
duration: 1000,
useNativeDriver: true,
})
);
animation.start();
return () => animation.stop();
}, [rotateAnim]);
const rotate = rotateAnim.interpolate({
inputRange: [0, 1],
outputRange: ['0deg', '360deg'],
});
return (
<View style={[{ alignItems: 'center', justifyContent: 'center' }, style]}>
<Animated.View
style={{
width: size,
height: size,
borderRadius: size / 2,
borderWidth: thickness,
borderColor: 'transparent',
borderTopColor: spinnerColor,
borderRightColor: spinnerColor,
transform: [{ rotate }],
}}
/>
</View>
);
}