diff --git a/apps/mobile/src/components/common/RotateableLoading.tsx b/apps/mobile/src/components/common/RotateableLoading.tsx index 805ab1f79..b5b9bb98f 100644 --- a/apps/mobile/src/components/common/RotateableLoading.tsx +++ b/apps/mobile/src/components/common/RotateableLoading.tsx @@ -1,5 +1,6 @@ import type { FC } from "react" import { useEffect } from "react" +import type { StyleProp, ViewStyle } from "react-native" import Animated, { Easing, useAnimatedStyle, @@ -11,10 +12,17 @@ import Animated, { import { Loading3CuteReIcon } from "@/src/icons/loading_3_cute_re" export interface RotateableLoadingProps { + className?: string + style?: StyleProp size?: number color?: string } -export const RotateableLoading: FC = ({ size = 36, color = "#fff" }) => { +export const RotateableLoading: FC = ({ + size = 36, + color = "#fff", + className, + style, +}) => { const rotate = useSharedValue(0) useEffect(() => { rotate.value = withRepeat( @@ -28,11 +36,14 @@ export const RotateableLoading: FC = ({ size = 36, color }, [rotate]) const rotateStyle = useAnimatedStyle(() => ({ + display: "flex", + justifyContent: "center", + alignItems: "center", transform: [{ rotate: `${rotate.value}deg` }], })) return ( - + ) diff --git a/apps/mobile/src/components/ui/loading/PlatformActivityIndicator.tsx b/apps/mobile/src/components/ui/loading/PlatformActivityIndicator.tsx index 27b3caad9..5f6aa9cec 100644 --- a/apps/mobile/src/components/ui/loading/PlatformActivityIndicator.tsx +++ b/apps/mobile/src/components/ui/loading/PlatformActivityIndicator.tsx @@ -12,6 +12,11 @@ export const PlatformActivityIndicator: FC< return Platform.OS === "ios" ? ( ) : ( - + ) }