feat: add reusable RefreshControl component
Add minimal RefreshControl wrapper component for pull-to-refresh functionality across screens. Includes theme colors for light/dark mode support. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
21
components/RefreshControl.tsx
Normal file
21
components/RefreshControl.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React from 'react'
|
||||
import { RefreshControl as RNRefreshControl } from 'react-native'
|
||||
|
||||
interface RefreshControlProps {
|
||||
refreshing: boolean
|
||||
onRefresh: () => void
|
||||
}
|
||||
|
||||
export default function RefreshControl({
|
||||
refreshing,
|
||||
onRefresh,
|
||||
}: RefreshControlProps) {
|
||||
return (
|
||||
<RNRefreshControl
|
||||
refreshing={refreshing}
|
||||
onRefresh={onRefresh}
|
||||
tintColor="#F5F5F5"
|
||||
colors={['#F5F5F5']}
|
||||
/>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user