diff --git a/src/components/NormalizedRNGHPressable.tsx b/src/components/NormalizedRNGHPressable.tsx index 8cf4fe60c0..718e5005c3 100644 --- a/src/components/NormalizedRNGHPressable.tsx +++ b/src/components/NormalizedRNGHPressable.tsx @@ -71,7 +71,7 @@ export const NormalizedRNGHPressable = React.forwardRef( onFocus: _onFocus, ...rest }, - ref, + _ref, ) { const onNormalizedPress = (event: PressableEvent) => { if (!onPress) return @@ -104,17 +104,15 @@ export const NormalizedRNGHPressable = React.forwardRef( } return ( - - - + ) }, ) diff --git a/src/components/dialogs/MutedWords.tsx b/src/components/dialogs/MutedWords.tsx index bd9edab3d4..d12bf63ca9 100644 --- a/src/components/dialogs/MutedWords.tsx +++ b/src/components/dialogs/MutedWords.tsx @@ -31,6 +31,7 @@ import {PageText_Stroke2_Corner0_Rounded as PageText} from '#/components/icons/P import {PlusLarge_Stroke2_Corner0_Rounded as Plus} from '#/components/icons/Plus' import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times' import {Loader} from '#/components/Loader' +import {NormalizedRNGHPressable} from '#/components/NormalizedRNGHPressable' import * as Prompt from '#/components/Prompt' import {Text} from '#/components/Typography' @@ -169,7 +170,8 @@ function MutedWordsInner() { + style={[a.flex_1]} + PressableComponent={NormalizedRNGHPressable}> @@ -184,7 +186,8 @@ function MutedWordsInner() { + style={[a.flex_1]} + PressableComponent={NormalizedRNGHPressable}> @@ -208,7 +211,8 @@ function MutedWordsInner() { + style={[a.flex_1]} + PressableComponent={NormalizedRNGHPressable}> @@ -223,7 +227,8 @@ function MutedWordsInner() { + style={[a.flex_1]} + PressableComponent={NormalizedRNGHPressable}> @@ -257,7 +262,8 @@ function MutedWordsInner() { + style={[a.flex_1]} + PressableComponent={NormalizedRNGHPressable}> @@ -273,7 +279,8 @@ function MutedWordsInner() { + style={[a.flex_1]} + PressableComponent={NormalizedRNGHPressable}> @@ -303,7 +310,8 @@ function MutedWordsInner() { name="exclude_following" style={[a.flex_row, a.justify_between]} value={excludeFollowing} - onChange={setExcludeFollowing}> + onChange={setExcludeFollowing} + PressableComponent={NormalizedRNGHPressable}> diff --git a/src/components/forms/Toggle.tsx b/src/components/forms/Toggle.tsx index 6dc387b239..bb5f154df0 100644 --- a/src/components/forms/Toggle.tsx +++ b/src/components/forms/Toggle.tsx @@ -1,9 +1,9 @@ import React from 'react' -import {Pressable, View, ViewStyle} from 'react-native' +import {Pressable, PressableProps, View, ViewStyle} from 'react-native' import Animated, {LinearTransition} from 'react-native-reanimated' +import {HITSLOP_10} from '#/lib/constants' import {isNative} from '#/platform/detection' -import {HITSLOP_10} from 'lib/constants' import { atoms as a, flatten, @@ -68,6 +68,7 @@ export type ItemProps = ViewStyleProp & { onChange?: (selected: boolean) => void isInvalid?: boolean children: ((props: ItemState) => React.ReactNode) | React.ReactNode + PressableComponent?: React.ComponentType } export function useItemContext() { @@ -159,6 +160,7 @@ export function Item({ style, type = 'checkbox', label, + PressableComponent = Pressable, ...rest }: ItemProps) { const { @@ -206,7 +208,7 @@ export function Item({ return ( - {typeof children === 'function' ? children(state) : children} - + ) } diff --git a/src/view/com/auth/server-input/index.tsx b/src/view/com/auth/server-input/index.tsx index 0e9eb0d199..c39106f702 100644 --- a/src/view/com/auth/server-input/index.tsx +++ b/src/view/com/auth/server-input/index.tsx @@ -13,6 +13,7 @@ import * as TextField from '#/components/forms/TextField' import * as ToggleButton from '#/components/forms/ToggleButton' import {Globe_Stroke2_Corner0_Rounded as Globe} from '#/components/icons/Globe' import {InlineLinkText} from '#/components/Link' +import {NormalizedRNGHPressable} from '#/components/NormalizedRNGHPressable' import {P, Text} from '#/components/Typography' export function ServerInputDialog({ @@ -83,7 +84,10 @@ export function ServerInputDialog({ label="Preferences" values={fixedOption} onChange={setFixedOption}> - + {_(msg`Bluesky`)} @@ -91,7 +95,8 @@ export function ServerInputDialog({ + label={_(msg`Custom`)} + PressableComponent={NormalizedRNGHPressable}> {_(msg`Custom`)}