| 1 | import { View } from "react-native"; |
| 2 | |
| 3 | import { AppActivityIndicator } from "../../components/AppActivityIndicator"; |
| 4 | import { AppText as Text } from "../../components/AppText"; |
| 5 | import { cn } from "../../lib/cn"; |
| 6 | |
| 7 | export function FilePreviewLoading(props: { |
| 8 | readonly message: string; |
| 9 | readonly background?: "sheet" | "card"; |
| 10 | }) { |
| 11 | return ( |
| 12 | <View |
| 13 | className={cn( |
| 14 | "flex-1 items-center justify-center gap-3 px-6", |
| 15 | props.background === "card" ? "bg-card" : "bg-sheet", |
| 16 | )} |
| 17 | > |
| 18 | <AppActivityIndicator /> |
| 19 | <Text className="text-center text-sm text-foreground-muted">{props.message}</Text> |
| 20 | </View> |
| 21 | ); |
| 22 | } |
| 23 | |
| 24 | export function FilePreviewNotice(props: { readonly title?: string; readonly children: string }) { |
| 25 | return ( |
| 26 | <View className="border-b border-warning-border bg-warning px-4 py-2"> |
| 27 | {props.title ? ( |
| 28 | <Text className="text-2xs font-t3-bold uppercase text-warning-foreground"> |
| 29 | {props.title} |
| 30 | </Text> |
| 31 | ) : null} |
| 32 | <Text className="text-xs leading-snug text-warning-foreground">{props.children}</Text> |
| 33 | </View> |
| 34 | ); |
| 35 | } |