xref: /expo/home/components/RefreshControl.tsx (revision cd4bd26b)
1import { useTheme } from '@react-navigation/native';
2import * as React from 'react';
3import { RefreshControl } from 'react-native';
4
5import Colors from '../constants/Colors';
6
7type Props = React.ComponentProps<typeof RefreshControl>;
8
9export default function StyledRefreshControl(props: Props) {
10  const theme = useTheme();
11  const color = theme.dark ? Colors.dark.refreshControl : Colors.light.refreshControl;
12
13  return <RefreshControl tintColor={color} {...props} />;
14}
15