expo-popcore-app/components/PaginationLoader.tsx

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>
)
}