mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-17 21:49:40 +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>
34 lines
No EOL
734 B
TypeScript
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>
|
|
);
|
|
} |