fix refresh control color in ViewSelector.tsx
This commit is contained in:
parent
91ae0d7775
commit
48a9e1b1dd
1 changed files with 9 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
import React, {useEffect, useState} from 'react'
|
import React, {useEffect, useState} from 'react'
|
||||||
import {Pressable, StyleSheet, View} from 'react-native'
|
import {Pressable, RefreshControl, StyleSheet, View} from 'react-native'
|
||||||
import {FlatList} from './Views'
|
import {FlatList} from './Views'
|
||||||
import {OnScrollCb} from 'lib/hooks/useOnMainScroll'
|
import {OnScrollCb} from 'lib/hooks/useOnMainScroll'
|
||||||
import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle'
|
import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle'
|
||||||
|
@ -41,6 +41,7 @@ export function ViewSelector({
|
||||||
onRefresh?: () => void
|
onRefresh?: () => void
|
||||||
onEndReached?: (info: {distanceFromEnd: number}) => void
|
onEndReached?: (info: {distanceFromEnd: number}) => void
|
||||||
}) {
|
}) {
|
||||||
|
const pal = usePalette('default')
|
||||||
const [selectedIndex, setSelectedIndex] = useState<number>(0)
|
const [selectedIndex, setSelectedIndex] = useState<number>(0)
|
||||||
|
|
||||||
// events
|
// events
|
||||||
|
@ -97,6 +98,13 @@ export function ViewSelector({
|
||||||
onScroll={onScroll}
|
onScroll={onScroll}
|
||||||
onRefresh={onRefresh}
|
onRefresh={onRefresh}
|
||||||
onEndReached={onEndReached}
|
onEndReached={onEndReached}
|
||||||
|
refreshControl={
|
||||||
|
<RefreshControl
|
||||||
|
refreshing={refreshing!}
|
||||||
|
onRefresh={onRefresh}
|
||||||
|
tintColor={pal.colors.text}
|
||||||
|
/>
|
||||||
|
}
|
||||||
onEndReachedThreshold={0.6}
|
onEndReachedThreshold={0.6}
|
||||||
contentContainerStyle={s.contentContainer}
|
contentContainerStyle={s.contentContainer}
|
||||||
removeClippedSubviews={true}
|
removeClippedSubviews={true}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue