diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-05-06 22:14:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-06 22:14:00 +0100 |
commit | 136b0e12abe4c4c00c15374c018dee36c522ec38 (patch) | |
tree | dbf4de0722c09bff75d8a4c31097ab80c4e71659 | |
parent | fdb5ffff53dfa1584f834b14e88cb03a4a615fb0 (diff) | |
download | voidsky-136b0e12abe4c4c00c15374c018dee36c522ec38.tar.zst |
make gif alt text prompt selectable (#3879)
-rw-r--r-- | src/components/Prompt.tsx | 6 | ||||
-rw-r--r-- | src/view/com/util/post-embeds/GifEmbed.tsx | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/components/Prompt.tsx b/src/components/Prompt.tsx index 327bbbaa2..92e848e8e 100644 --- a/src/components/Prompt.tsx +++ b/src/components/Prompt.tsx @@ -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> diff --git a/src/view/com/util/post-embeds/GifEmbed.tsx b/src/view/com/util/post-embeds/GifEmbed.tsx index dde6efe34..286b57992 100644 --- a/src/view/com/util/post-embeds/GifEmbed.tsx +++ b/src/view/com/util/post-embeds/GifEmbed.tsx @@ -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} |