tweak types

This commit is contained in:
Hailey
2024-10-01 16:20:42 -07:00
parent 368a9df8a2
commit a4c7e2f393
4 changed files with 11 additions and 12 deletions
+1 -1
View File
@@ -172,7 +172,7 @@
"react-native-compressor": "^1.8.24",
"react-native-date-picker": "^4.4.2",
"react-native-drawer-layout": "^4.0.0-alpha.3",
"react-native-gesture-handler": "^2.20.0",
"react-native-gesture-handler": "2.20.0",
"react-native-get-random-values": "~1.11.0",
"react-native-image-crop-picker": "0.41.2",
"react-native-ios-context-menu": "^1.15.3",
+5 -8
View File
@@ -1,6 +1,6 @@
import React from 'react'
import {StyleProp, View, ViewStyle} from 'react-native'
import {} from 'react-native-gesture-handler'
import {BlueskyBottomSheetPressable as Pressable} from '@haileyok/bluesky-bottom-sheet'
import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react'
import flattenReactChildren from 'react-keyed-flatten-children'
@@ -103,7 +103,7 @@ export function Outer({
export function Item({children, label, style, onPress, ...rest}: ItemProps) {
const t = useTheme()
const {control} = React.useContext(Context)
const {state: focused, onIn: onFocus, onOut: onBlur} = useInteractionState()
const {state: focused} = useInteractionState()
const {
state: pressed,
onIn: onPressIn,
@@ -116,14 +116,11 @@ export function Item({children, label, style, onPress, ...rest}: ItemProps) {
accessibilityHint=""
accessibilityLabel={label}
onPress={e => {
control?.close()
onPress(e)
if (!e.defaultPrevented) {
control?.close()
}
}}
onFocus={onFocus}
onBlur={onBlur}
// onFocus={onFocus}
// onBlur={onBlur}
onPressIn={e => {
onPressIn()
rest.onPressIn?.(e)
+4 -2
View File
@@ -4,6 +4,8 @@ import {
GestureResponderEvent,
PressableProps,
} from 'react-native'
import {PressableEvent} from 'react-native-gesture-handler/lib/typescript/components/Pressable/PressableProps'
import {BueskyBottomSheetPressableProps} from '@haileyok/bluesky-bottom-sheet'
import {TextStyleProp, ViewStyleProp} from '#/alf'
import * as Dialog from '#/components/Dialog'
@@ -87,10 +89,10 @@ export type TriggerChildProps =
}
export type ItemProps = React.PropsWithChildren<
Omit<PressableProps, 'style'> &
Omit<BueskyBottomSheetPressableProps, 'style'> &
ViewStyleProp & {
label: string
onPress: (e: GestureResponderEvent) => void
onPress: (e: PressableEvent | GestureResponderEvent) => void
}
>
+1 -1
View File
@@ -18068,7 +18068,7 @@ react-native-drawer-layout@^4.0.0-alpha.3:
dependencies:
use-latest-callback "^0.1.9"
react-native-gesture-handler@^2.20.0:
react-native-gesture-handler@2.20.0:
version "2.20.0"
resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-2.20.0.tgz#2d9ec4e9bd22619ebe36269dda3ecb1173928276"
integrity sha512-rFKqgHRfxQ7uSAivk8vxCiW4SB3G0U7jnv7kZD4Y90K5kp6YrU8Q3tWhxe3Rx55BIvSd3mBe9ZWbWVJ0FsSHPA==