diff options
Diffstat (limited to 'src/view')
-rw-r--r-- | src/view/com/composer/photos/Gallery.tsx | 6 | ||||
-rw-r--r-- | src/view/com/util/forms/Button.tsx | 1 | ||||
-rw-r--r-- | src/view/com/util/forms/DropdownButton.tsx | 2 | ||||
-rw-r--r-- | src/view/com/util/forms/NativeDropdown.web.tsx | 1 |
4 files changed, 6 insertions, 4 deletions
diff --git a/src/view/com/composer/photos/Gallery.tsx b/src/view/com/composer/photos/Gallery.tsx index af784b4f6..bc18c81f1 100644 --- a/src/view/com/composer/photos/Gallery.tsx +++ b/src/view/com/composer/photos/Gallery.tsx @@ -124,7 +124,7 @@ type GalleryItemProps = { image: ComposerImage altTextControlStyle?: ViewStyle imageControlsStyle?: ViewStyle - imageStyle?: ViewStyle + imageStyle?: ImageStyle onChange: (next: ComposerImage) => void onRemove: () => void } @@ -160,7 +160,7 @@ const GalleryItem = ({ return ( <View - style={imageStyle} + style={imageStyle as ViewStyle} // Fixes ALT and icons appearing with half opacity when the post is inactive renderToHardwareTextureAndroid> <TouchableOpacity @@ -221,7 +221,7 @@ const GalleryItem = ({ <Image testID="selectedPhotoImage" - style={[styles.image, imageStyle] as ImageStyle} + style={[styles.image, imageStyle]} source={{ uri: (image.transformed ?? image.source).path, }} diff --git a/src/view/com/util/forms/Button.tsx b/src/view/com/util/forms/Button.tsx index 62ef2c4f1..96b49a003 100644 --- a/src/view/com/util/forms/Button.tsx +++ b/src/view/com/util/forms/Button.tsx @@ -31,6 +31,7 @@ export type ButtonType = // Augment type for react-native-web (see https://github.com/necolas/react-native-web/issues/1684#issuecomment-766451866) declare module 'react-native' { interface PressableStateCallbackType { + // @ts-ignore web only hovered?: boolean focused?: boolean } diff --git a/src/view/com/util/forms/DropdownButton.tsx b/src/view/com/util/forms/DropdownButton.tsx index f0751e45b..6cb4b9557 100644 --- a/src/view/com/util/forms/DropdownButton.tsx +++ b/src/view/com/util/forms/DropdownButton.tsx @@ -87,7 +87,7 @@ export function DropdownButton({ }: PropsWithChildren<DropdownButtonProps>) { const {_} = useLingui() - const ref1 = useRef<TouchableOpacity>(null) + const ref1 = useRef<View>(null) const ref2 = useRef<View>(null) const onPress = (e: GestureResponderEvent) => { diff --git a/src/view/com/util/forms/NativeDropdown.web.tsx b/src/view/com/util/forms/NativeDropdown.web.tsx index 364e10d10..c1a0b8096 100644 --- a/src/view/com/util/forms/NativeDropdown.web.tsx +++ b/src/view/com/util/forms/NativeDropdown.web.tsx @@ -229,6 +229,7 @@ const getKey = (label: string, index: number, id?: string) => { return `${label}_${index}` } +// @ts-expect-error - web only styles. the only style that should be broken here is `outline` const styles = StyleSheet.create({ separator: { height: 1, |