diff options
author | Ollie H <renahlee@outlook.com> | 2023-05-01 18:38:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-01 20:38:47 -0500 |
commit | 83959c595d52ceb7aa4e3f68441c5ac41c389ebc (patch) | |
tree | 3385d9a16e90fc8d5290ebdef104f922c17642a9 /src/view/com/util/fab | |
parent | c75c888de2407d3314cad07989174201313facaa (diff) | |
download | voidsky-83959c595d52ceb7aa4e3f68441c5ac41c389ebc.tar.zst |
React Native accessibility (#539)
* React Native accessibility * First round of changes * Latest update * Checkpoint * Wrap up * Lint * Remove unhelpful image hints * Fix navigation * Fix rebase and lint * Mitigate an known issue with the password entry in login * Fix composer dismiss * Remove focus on input elements for web * Remove i and npm * pls work * Remove stray declaration * Regenerate yarn.lock --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/view/com/util/fab')
-rw-r--r-- | src/view/com/util/fab/FABInner.tsx | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/view/com/util/fab/FABInner.tsx b/src/view/com/util/fab/FABInner.tsx index 3d44c0dd4..5eb4a6588 100644 --- a/src/view/com/util/fab/FABInner.tsx +++ b/src/view/com/util/fab/FABInner.tsx @@ -1,25 +1,19 @@ -import React from 'react' +import React, {ComponentProps} from 'react' import {observer} from 'mobx-react-lite' -import { - Animated, - GestureResponderEvent, - StyleSheet, - TouchableWithoutFeedback, -} from 'react-native' +import {Animated, StyleSheet, TouchableWithoutFeedback} from 'react-native' import LinearGradient from 'react-native-linear-gradient' import {gradients} from 'lib/styles' import {useAnimatedValue} from 'lib/hooks/useAnimatedValue' import {useStores} from 'state/index' import {isMobileWeb} from 'platform/detection' -type OnPress = ((event: GestureResponderEvent) => void) | undefined -export interface FABProps { +export interface FABProps + extends ComponentProps<typeof TouchableWithoutFeedback> { testID?: string icon: JSX.Element - onPress: OnPress } -export const FABInner = observer(({testID, icon, onPress}: FABProps) => { +export const FABInner = observer(({testID, icon, ...props}: FABProps) => { const store = useStores() const interp = useAnimatedValue(0) React.useEffect(() => { @@ -34,7 +28,7 @@ export const FABInner = observer(({testID, icon, onPress}: FABProps) => { transform: [{translateY: Animated.multiply(interp, 60)}], } return ( - <TouchableWithoutFeedback testID={testID} onPress={onPress}> + <TouchableWithoutFeedback testID={testID} {...props}> <Animated.View style={[styles.outer, isMobileWeb && styles.mobileWebOuter, transform]}> <LinearGradient |