make gif alt text prompt selectable (#3879)

zio/stable
Samuel Newman 2024-05-06 22:14:00 +01:00 committed by GitHub
parent fdb5ffff53
commit 136b0e12ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -62,12 +62,16 @@ export function TitleText({children}: React.PropsWithChildren<{}>) {
)
}
export function DescriptionText({children}: React.PropsWithChildren<{}>) {
export function DescriptionText({
children,
selectable,
}: React.PropsWithChildren<{selectable?: boolean}>) {
const t = useTheme()
const {descriptionId} = React.useContext(Context)
return (
<Text
nativeID={descriptionId}
selectable={selectable}
style={[a.text_md, a.leading_snug, t.atoms.text_contrast_high, a.pb_lg]}>
{children}
</Text>

View File

@ -174,7 +174,7 @@ function AltText({text}: {text: string}) {
<Prompt.TitleText>
<Trans>Alt Text</Trans>
</Prompt.TitleText>
<Prompt.DescriptionText>{text}</Prompt.DescriptionText>
<Prompt.DescriptionText selectable>{text}</Prompt.DescriptionText>
<Prompt.Actions>
<Prompt.Action
onPress={control.close}