mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-17 01:39:39 +02:00
Projects included: - maerchenzauber (NestJS backend + Expo mobile + SvelteKit web + Astro landing) - manacore (Expo mobile + SvelteKit web + Astro landing) - manadeck (NestJS backend + Expo mobile + SvelteKit web) - memoro (Expo mobile + SvelteKit web + Astro landing) This commit preserves the current state before monorepo restructuring. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
74 lines
1.9 KiB
TypeScript
74 lines
1.9 KiB
TypeScript
import React, { useEffect, useRef } from 'react';
|
|
import { View, Animated, ViewStyle } from 'react-native';
|
|
import MemoroLogo from '~/components/atoms/MemoroLogo';
|
|
import { useTheme } from '~/features/theme/ThemeProvider';
|
|
|
|
interface PulsingLogoAnimationProps {
|
|
size?: number;
|
|
style?: ViewStyle;
|
|
color?: string;
|
|
}
|
|
|
|
/**
|
|
* Einfache pulsierende Logo-Animation
|
|
* Minimalistisch und elegant - perfekt für Loading-States
|
|
*/
|
|
export function PulsingLogoAnimation({
|
|
size = 80,
|
|
style,
|
|
color
|
|
}: PulsingLogoAnimationProps) {
|
|
const { colors } = useTheme();
|
|
const scaleAnim = useRef(new Animated.Value(1)).current;
|
|
const opacityAnim = useRef(new Animated.Value(1)).current;
|
|
|
|
const logoColor = color || colors.primary;
|
|
|
|
useEffect(() => {
|
|
// Kombinierte Scale + Opacity Animation
|
|
const animation = Animated.loop(
|
|
Animated.sequence([
|
|
Animated.parallel([
|
|
Animated.timing(scaleAnim, {
|
|
toValue: 1.1,
|
|
duration: 1000,
|
|
useNativeDriver: true,
|
|
}),
|
|
Animated.timing(opacityAnim, {
|
|
toValue: 0.6,
|
|
duration: 1000,
|
|
useNativeDriver: true,
|
|
}),
|
|
]),
|
|
Animated.parallel([
|
|
Animated.timing(scaleAnim, {
|
|
toValue: 1,
|
|
duration: 1000,
|
|
useNativeDriver: true,
|
|
}),
|
|
Animated.timing(opacityAnim, {
|
|
toValue: 1,
|
|
duration: 1000,
|
|
useNativeDriver: true,
|
|
}),
|
|
]),
|
|
])
|
|
);
|
|
|
|
animation.start();
|
|
|
|
return () => animation.stop();
|
|
}, [scaleAnim, opacityAnim]);
|
|
|
|
return (
|
|
<View style={[{ alignItems: 'center', justifyContent: 'center' }, style]}>
|
|
<Animated.View
|
|
style={{
|
|
transform: [{ scale: scaleAnim }],
|
|
opacity: opacityAnim,
|
|
}}>
|
|
<MemoroLogo size={size} color={logoColor} />
|
|
</Animated.View>
|
|
</View>
|
|
);
|
|
}
|