Files
expo-popcore-app/components/PaginationLoader.tsx
imeepos 3bc6789660 feat: add reusable PaginationLoader component with TDD
Add minimal PaginationLoader component for infinite scroll/pagination scenarios. Displays small ActivityIndicator with optional text, supports theme colors, and is designed for use in FlatList ListFooterComponent.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 11:33:49 +08:00

18 lines
536 B
TypeScript

import React from 'react'
import { View, ActivityIndicator, ViewProps } from 'react-native'
import Text from './ui/Text'
interface PaginationLoaderProps extends ViewProps {
text?: string
color?: string
}
export default function PaginationLoader({ text, color = '#F5F5F5', testID, ...props }: PaginationLoaderProps) {
return (
<View testID={testID} className="py-4 items-center" {...props}>
<ActivityIndicator size="small" color={color} />
{text && <Text className="mt-2 text-xs">{text}</Text>}
</View>
)
}