make alt text selectable

This commit is contained in:
Hailey
2024-01-15 13:42:25 -08:00
parent e5472a13da
commit a3ba6e7825
2 changed files with 7 additions and 8 deletions
@@ -45,7 +45,7 @@ export default function ExpoUITextView({
{...textDefaults}
{...rest}
ellipsizeMode={rest.ellipsizeMode ?? rest.lineBreakMode ?? 'tail'}
style={[{flex: 1}, rootStyle]}>
style={[{flex: 1}, flattenedStyle]}>
{React.Children.toArray(children).map((c, index) => {
if (React.isValidElement(c)) {
return c
+6 -7
View File
@@ -1,5 +1,5 @@
import React from 'react'
import {Pressable, StyleSheet, View} from 'react-native'
import {StyleSheet, View} from 'react-native'
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
import ImageView from './ImageViewing'
import {shareImageModal, saveImageToMediaLibrary} from 'lib/media/manip'
@@ -105,16 +105,15 @@ function LightboxFooter({imageIndex}: {imageIndex: number}) {
return (
<View style={[styles.footer]}>
{altText ? (
<Pressable
onPress={() => setAltExpanded(!isAltExpanded)}
accessibilityRole="button">
<View accessibilityRole="button" style={styles.footerText}>
<Text
style={[s.gray3, styles.footerText]}
style={[s.gray3]}
numberOfLines={isAltExpanded ? undefined : 3}
selectable>
selectable
onPress={() => setAltExpanded(prev => !prev)}>
{altText}
</Text>
</Pressable>
</View>
) : null}
<View style={styles.footerBtns}>
<Button