diff options
author | Ollie Hsieh <renahlee@outlook.com> | 2023-04-19 18:05:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-19 20:05:10 -0500 |
commit | b24ba3adc93cf940eb936309ae73a2c205eaef24 (patch) | |
tree | 373337a5f364fd1d83010c33bae3d878437d4ca7 /src/view/com/util/Selector.tsx | |
parent | 1472bd4f173a483e5f1a91514244fecaec23808f (diff) | |
download | voidsky-b24ba3adc93cf940eb936309ae73a2c205eaef24.tar.zst |
Add cursor to clickable elements (#491)
* Add cursor to clickable elements * Add cursor to clickable elements * Update per comments * Fix word wrap in notifications * Center the web login-load screen * Add hover states on web * Fix lint --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/view/com/util/Selector.tsx')
-rw-r--r-- | src/view/com/util/Selector.tsx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/view/com/util/Selector.tsx b/src/view/com/util/Selector.tsx index 03db13bd1..872b78184 100644 --- a/src/view/com/util/Selector.tsx +++ b/src/view/com/util/Selector.tsx @@ -1,10 +1,5 @@ import React, {createRef, useState, useMemo, useRef} from 'react' -import { - Animated, - StyleSheet, - TouchableWithoutFeedback, - View, -} from 'react-native' +import {Animated, Pressable, StyleSheet, View} from 'react-native' import {Text} from './text/Text' import {usePalette} from 'lib/hooks/usePalette' @@ -99,7 +94,7 @@ export function Selector({ {items.map((item, i) => { const selected = i === selectedIndex return ( - <TouchableWithoutFeedback key={i} onPress={() => onPressItem(i)}> + <Pressable key={item} onPress={() => onPressItem(i)}> <View style={styles.item} ref={itemRefs[i]}> <Text style={ @@ -110,7 +105,7 @@ export function Selector({ {item} </Text> </View> - </TouchableWithoutFeedback> + </Pressable> ) })} </View> |