Skip to content

Commit

Permalink
make gif alt text prompt selectable (#3879)
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzius authored May 6, 2024
1 parent fdb5fff commit 136b0e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/components/Prompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion src/view/com/util/post-embeds/GifEmbed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 136b0e1

Please sign in to comment.