| 1 | import { ScrollView } from "react-native"; |
| 2 | |
| 3 | import { AppText } from "./AppText"; |
| 4 | |
| 5 | /** Keep the original reference readable without letting long URLs displace the preview. */ |
| 6 | export function MediaSourceCaption(props: { readonly source: string | undefined }) { |
| 7 | if (!props.source) return null; |
| 8 | return ( |
| 9 | <ScrollView |
| 10 | style={{ maxHeight: 88, flexGrow: 0 }} |
| 11 | contentContainerStyle={{ paddingHorizontal: 16, paddingBottom: 8 }} |
| 12 | nestedScrollEnabled |
| 13 | > |
| 14 | <AppText selectable className="text-xs text-white/70"> |
| 15 | {props.source} |
| 16 | </AppText> |
| 17 | </ScrollView> |
| 18 | ); |
| 19 | } |