Skip to content
Source
Sign inSign up

ThreadCreationFailedCard.tsx

26 lines929 Bytes

1import { Button } from "../../components/ui/Button";
2import { View } from "react-native";
3​
4import { AppText as Text } from "../../components/ui/AppText";
5​
6export function ThreadCreationFailedCard(props: {
7 readonly reason: string;
8 readonly onEditTask: () => void;
9}) {
10 return (
11 <View className="gap-2.5 rounded-[20px] border border-border-subtle bg-card-alt p-4">
12 <Text className="font-t3-bold text-2xs uppercase tracking-[1.1px] text-danger-foreground">
13 Could not start task
14 </Text>
15 <Text className="font-sans text-sm leading-normal text-foreground-secondary">
16 {props.reason}
17 </Text>
18 <Text className="font-sans text-xs leading-normal text-foreground-secondary">
19 Your prompt was kept in the project draft.
20 </Text>
21 <View className="flex-row">
22 <Button label="Edit task" tone="primary" onPress={props.onEditTask} />
23 </View>
24 </View>
25 );