managarten/memoro/apps/mobile/components/molecules/LottieAnimation.tsx
Till-JS e7f5f942f3 chore: initial commit - consolidate 4 projects into monorepo
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>
2025-11-22 23:38:24 +01:00

34 lines
No EOL
734 B
TypeScript

import React from 'react';
import { View, ViewStyle } from 'react-native';
import LottieView from 'lottie-react-native';
interface LottieAnimationProps {
source: any; // Lottie JSON file
style?: ViewStyle;
autoPlay?: boolean;
loop?: boolean;
speed?: number;
onAnimationFinish?: () => void;
}
export function LottieAnimation({
source,
style,
autoPlay = true,
loop = true,
speed = 1,
onAnimationFinish,
}: LottieAnimationProps) {
return (
<View style={[{ width: 200, height: 200 }, style]}>
<LottieView
source={source}
autoPlay={autoPlay}
loop={loop}
speed={speed}
style={{ flex: 1 }}
onAnimationFinish={onAnimationFinish}
/>
</View>
);
}