The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import { Pressable, View } from "react-native"; |
| 2 | |
| 3 | import type { useMediaActions } from "../state/mediaActions"; |
| 4 | import { SymbolView } from "./ui/AppSymbol"; |
| 5 | import { AppText } from "./ui/AppText"; |
| 6 | import { MediaActionsMenu } from "./MediaActionsMenu"; |
| 7 | import { MediaSourceCaption } from "./MediaSourceCaption"; |
| 8 | |
| 9 | /** The bar over a full-screen image or video: always dark, whatever the app theme. */ |
| 10 | export function MediaPreviewHeader(props: { |
| 11 | readonly title: string; |
| 12 | readonly media: ReturnType<typeof useMediaActions>; |
| 13 | readonly closeAccessibilityLabel: string; |
| 14 | readonly onClose: () => void; |
| 15 | }) { |
| 16 | return ( |
| 17 | <> |
| 18 | <View className="min-h-14 flex-row items-center gap-3 pl-4 pr-2"> |
| 19 | <AppText className="flex-1 font-t3-medium text-base text-white" numberOfLines={2}> |
| 20 | {props.title} |
| 21 | </AppText> |
| 22 | <MediaActionsMenu media={props.media} inModal /> |
| 23 | <Pressable |
| 24 | accessibilityRole="button" |
| 25 | accessibilityLabel={props.closeAccessibilityLabel} |
| 26 | onPress={props.onClose} |
| 27 | className="size-12 items-center justify-center" |
| 28 | > |
| 29 | <SymbolView name="xmark" size={20} tintColor="#ffffff" type="monochrome" /> |
| 30 | </Pressable> |
| 31 | </View> |
| 32 | <MediaSourceCaption source={props.media.title} /> |
| 33 | </> |
| 34 | ); |
| 35 | } |