make alt text selectable
This commit is contained in:
@@ -45,7 +45,7 @@ export default function ExpoUITextView({
|
|||||||
{...textDefaults}
|
{...textDefaults}
|
||||||
{...rest}
|
{...rest}
|
||||||
ellipsizeMode={rest.ellipsizeMode ?? rest.lineBreakMode ?? 'tail'}
|
ellipsizeMode={rest.ellipsizeMode ?? rest.lineBreakMode ?? 'tail'}
|
||||||
style={[{flex: 1}, rootStyle]}>
|
style={[{flex: 1}, flattenedStyle]}>
|
||||||
{React.Children.toArray(children).map((c, index) => {
|
{React.Children.toArray(children).map((c, index) => {
|
||||||
if (React.isValidElement(c)) {
|
if (React.isValidElement(c)) {
|
||||||
return c
|
return c
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react'
|
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 {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||||
import ImageView from './ImageViewing'
|
import ImageView from './ImageViewing'
|
||||||
import {shareImageModal, saveImageToMediaLibrary} from 'lib/media/manip'
|
import {shareImageModal, saveImageToMediaLibrary} from 'lib/media/manip'
|
||||||
@@ -105,16 +105,15 @@ function LightboxFooter({imageIndex}: {imageIndex: number}) {
|
|||||||
return (
|
return (
|
||||||
<View style={[styles.footer]}>
|
<View style={[styles.footer]}>
|
||||||
{altText ? (
|
{altText ? (
|
||||||
<Pressable
|
<View accessibilityRole="button" style={styles.footerText}>
|
||||||
onPress={() => setAltExpanded(!isAltExpanded)}
|
|
||||||
accessibilityRole="button">
|
|
||||||
<Text
|
<Text
|
||||||
style={[s.gray3, styles.footerText]}
|
style={[s.gray3]}
|
||||||
numberOfLines={isAltExpanded ? undefined : 3}
|
numberOfLines={isAltExpanded ? undefined : 3}
|
||||||
selectable>
|
selectable
|
||||||
|
onPress={() => setAltExpanded(prev => !prev)}>
|
||||||
{altText}
|
{altText}
|
||||||
</Text>
|
</Text>
|
||||||
</Pressable>
|
</View>
|
||||||
) : null}
|
) : null}
|
||||||
<View style={styles.footerBtns}>
|
<View style={styles.footerBtns}>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
Reference in New Issue
Block a user