Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

FilePreviewFeedback.tsx

34 lines1.0 KB

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